首页 > 其他 > 详细

内容为空弹出提示框

时间:2015-08-21 18:50:38      阅读:253      评论:0      收藏:0      [点我收藏+]

<!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="&nbsp;搜索&nbsp;" >
</div>

</form>
</body>
</html>

<script type="text/javascript">
function comfirm()
{
    if(document.sousuo.game_name.value=="")
    {
    alert("内容不能为空");
    return false;
   
    }
    return true;
   
    }
</script>

技术分享

内容为空弹出提示框

原文:http://www.cnblogs.com/qiuzhimutou/p/4748518.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!