Search for text in string

iclosem

Client
Регистрация
24.07.2012
Сообщения
5
Благодарностей
0
Баллы
0
I want to know if you can search for text in a string.

For example:
Let's say I have Variable1 with the value "Blue widget"
I want to see if Variable1 contains the term "widget." If so I perform one task, if not, I perform another.
If there is no function I'd like to see if you have any other tutorials on using javascript with zennoposter like how to pass in variables and return variables. If I know how I'm sure I can pass in variable1 and then use variable1.indexof("widget") no?

Any help would be appreciated.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 184
Баллы
113
I want to know if you can search for text in a string.

For example:
Let's say I have Variable1 with the value "Blue widget"
I want to see if Variable1 contains the term "widget." If so I perform one task, if not, I perform another.
If there is no function I'd like to see if you have any other tutorials on using javascript with zennoposter like how to pass in variables and return variables. If I know how I'm sure I can pass in variable1 and then use variable1.indexof("widget") no?

Any help would be appreciated.
Here you are.

Capture.PNG
 
  • Спасибо
Реакции: synapsol

iclosem

Client
Регистрация
24.07.2012
Сообщения
5
Благодарностей
0
Баллы
0
I just figured it out on my own and then I saw this. Thank you very much though!
 

Kepperbes

Client
Регистрация
19.12.2011
Сообщения
241
Благодарностей
81
Баллы
28
Lol @ Indy's drawing. Good job bro, lol.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 184
Баллы
113

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)