I'm writing a form validation using Jscript,
But I don't know why I just can't even call a simple alert function by onclick.
Here's part of my code
<html>
<head>
<title>Check</title>
<script type="text/javascript">
function displaymessage()
{
alert("Hello World!");
}
</script></head>
...
<form name="checkout" id="checkout" method="post" action="1.php">
<table align="center">
<tr>
<td>*Name</td>
<td><input type="text" name="name" id="name" size="40"/></td>
</tr>
<tr>
<td>*Phone</td>
<td><input type="text" name="phone" id="phone" size="40"/></td>
</tr>
<tr>
<td>*Address</td>
<td><textarea rows="4" cols="40" name="address"></textarea></td>
</tr>
</table>
<input type="button" value="Click me!" onclick="return displaymessage()" />
</form>
</html>
I suppose the button should be a submit button
<input name="Submit" type="submit" value="Submit"onclick="return validate_form()"/>
But during my testing, even a simple "Click me!" button doesn't work... Will there be anyone who countered kind of question like that before?
onclickattribute is together value..without a spacevalidate_form()function having some problems?submitevent