Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to find a word in select text?

New Here ,
Mar 18, 2008 Mar 18, 2008
if offer is in select text, i want display some message.
How can i find select text contains offer using JS?.

selObj.options[selIndex].text == "%offer%"
TOPICS
Getting started
297
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 18, 2008 Mar 18, 2008
Take a look at javascript's string functions or regular expressions for more complex searches. Just remember javascript is case sensitive.

http://www.w3schools.com/jsref/jsref_obj_string.asp
http://www.w3schools.com/jsref/jsref_obj_regexp.asp
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2008 Mar 18, 2008
LATEST
Hi,
Try using find or findnocase functions.
Prasanth
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources