日期:2014-05-16 浏览次数:20494 次
<script type="text/javascript">
function check(){
var x=document.getElementsByName("username").value;
if(x==null || x==""){
alert("Please input username");
return false;
}
}
</script>
</head>
<body>
<form action="js.php" method="POST" onsubmit="return check()">
<input type="text" name="username"></input>
<input type="submit" name="sub"></input>
</form>
</body>
var ctrip = document.getElememntsByName("optctr_ip")[0].value;