find word javascript

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
fabiodurgante
Posts: 20
Joined: Sun Jan 07, 2018 5:02 pm

find word javascript

Post by fabiodurgante » Mon Nov 26, 2018 10:28 pm

i have this tag
<h2 id="winlose" style="color: green;"> You WIn </h2>
or this tag
<h2 id="winlose" style="color: red;"> You Lost </h2>

how i find in javascript for verification you win or you lost

my java script but dont work

Code: Select all

var winloss=null;

winloss = iimPlay("TAG POS=1 TYPE=H2 ATTR=ID:winlose");

if(winloss = "You won"){
alert ("win")
}

if(winloss = "You lost"){
alert ("lost")
}

Post Reply