您的位置:首页 > 其它

内容为空弹出提示框

2015-08-21 17:29 447 查看
<!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>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: