<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form name="sousuo" action="ss.php" id="sousuo" method="post" onsubmit="return comfirm()">
<div style="margin:50px"><h2 style=" color:#C60; float:left; margin:30px 10px 30px 30px">请填写游戏名称:</h2><input type="text" name="game_name" style=" margin:30px 30px 30px 0px" maxlength="100" >
<input type="submit" value=" 搜索 " >
</div>
</form>
</body>
</html>
<script type="text/javascript">
function comfirm()
{
if(document.sousuo.game_name.value=="")
{
alert("内容不能为空");
return false;
}
return true;
}
</script>
时间: 2024-11-09 00:10:37