Testing for characters in JS string
Posted: Sat Jun 21, 2003 12:57 pm
simple question using JavaScript, how can i determine if a string contains certain characters, eg qoutes or asterisks?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<html><head><title>Test</title>
</head><body>
<script type="text/javascript">
<!--
var Aussage = "Hello there, sky is blue, sun is bright, life is just like dynamite.";
var Ergebnis = Aussage.search(/dynamite.+/);
if(Ergebnis != -1)
alert("found");
//-->
</script>
</body></html>