<input type="text" name="txtKeywords" id="txtKeywords" />
<input type="submit" value="Search" title="Search" id="btnSearch" />
<script>
$(document).ready(function () {
$("#btnSearch").click(function () {
var titleValue = $("#txtKeywords").val();
// Apply check for special characters
if ((/^[a-zA-Z0-9- ]*$/.test(titleValue) == false) ) {
alert('Your String Contains illegal Characters.');
return false;
}
});
});
</script>
<input type="submit" value="Search" title="Search" id="btnSearch" />
<script>
$(document).ready(function () {
$("#btnSearch").click(function () {
var titleValue = $("#txtKeywords").val();
// Apply check for special characters
if ((/^[a-zA-Z0-9- ]*$/.test(titleValue) == false) ) {
alert('Your String Contains illegal Characters.');
return false;
}
});
});
</script>
0 comments:
Post a Comment