top of page

Highlightning

CLOSE.png

In this EXAMPLE we are going to highlight some text. The code for this function is a modified version of J.D.'s code (a very good JS/CORVID-programmer).

Use the input-field and type in, for which word you want to search in this text, and which word(s), should be highlighted.

I hope you like this example, and leaves a like for J.D.'s SOLUTION!

Highlight
CODE

CODE

CLOSE.png

$w.onReady(function () {   });


 

export function button66_click(event) {

    let searchWord = $w('#input1').value

    console.log(searchWord)

    let str = $w('#text1').text

    console.log(str)

        let res = str.replace(searchWord, `<mark>${searchWord}</mark>`);

        console.log(res)

    $w("#text1").html=res

}

Comment-Box

CLOSE.png

Version-1.0

Under_Construction.png

Leave a comment. . .

Arrow.png

General-Settings

ON                 OFF

Show Text-Length

ON                 OFF

max. Text-Length

ON                 OFF

Show Key-Press

ON                 OFF

Show Key-Code

ON                 OFF

Show Total-Count

Character-limit

Load default settings
Save
russian-dima 00:08:25

! YES ! Arthur is out there XDDDDDDDD

30.7.2020
russian-dima 00:08:07

Hello! Some one out there?

30.7.2020
russian-dima 18:55:23
29.7.2020
russian-dima 17:26:48

No problem, you are welcome ;-)

24.7.2020
arthurvalatin 22:54:45

Very helpful tutorial russian-dima! Thank you so much!

24/07/2020
Seite 1 von 1
Design
Settings
About
CLOSE.png
Leave a comment, or start a chat.

Post-Comment

- - -

Pressed-Key

- - -

Key-Code

Text-Length

- - -

max. Text-Length

- - -

Number of Comments

- - -

designed & developed by russian-dima

Write a comment
bottom of page