Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if variable contains data

Status
Not open for further replies.

tyrant1969

Programmer
Dec 13, 2004
68
US
Is there a way in Javascript to check if a variable has part of a certain value?

For example - I am prompting my users to enter a URL into a javascript prompt box. I want to make sure that the user has entered an HTTP:// at the start of the URL.

How can this be done?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top