威尼斯赌博游戏

JS判断字段是否存在

来源: 路由器窝| 2017-03-19 19:20
            <form role="form" accept-charset="UTF-8" action="#login" method="POST" id="signup-form" class="clearfix pull-right">
              <input type="text" placeholder="官方客服查询" class="form-control" id="name" name="name" autofocus="autofocus">
              <button onclick="authorize()" class="btn btn-default center-block" type="button">
                <i class="fa fa-search"></i>
              </button>
            </form>
			
<script type="text/javascript">
function authorize(form){
var name = document.getElementById("name");


if(name.value=="wubupuacc"){
	alert("此微信号是官方微信");
	return false;
	}
if(name.value=="1"){
	alert("此微信号是官方微信");
	return false;
	}
if(name.value!="1" & name.value!="wubupuacc" ){
	alert("请注意此微信号非官方微信");
	return false;
	}
}
</script>

猜你喜欢
推荐
随机推荐
相关文档
Top
Baidu