javascript笔记之onload和表单提交

javascript笔记之onload和表单提交

<html>
<head>
<script>
function hello(){
alert("hello");
}
function byee(){
alert("bye");
}
function show(){
var v = document.myform.inname.value;
var p = document.myform.pwd.value;
alert(v+p);
}
function valia(f){
var v = document.myform.inname.value;
var p = document.myform.pwd.value;
return true;
}
</script>
</head>
<body onload="hello()" onUnLoad="byee()" >
<form action="dd" name="myform" onsubmit="return valia(this) "> 
<input type="text" name="inname"   />
<input type="text" name="pwd" />
<input type="submit"  />
</form>
</body>
</html>

你可能感兴趣的:(javascript笔记之onload和表单提交)