onclick事件不触发 代码如下 财富值78

2016-10-14 14:33发布

jsp:

                        <a href="javascript:;" onclick="javascript:getsensitive()"                         style="width: 100px;margin-bottom: 4px;                 height:35px; text-decoration: none;text-align:center;"                         class="btn btn-primary radius"> <i class="Hui-iconfont">&#xe665;</i><span                             style="margin-top: 1">查询</span>                     </a>                 </a>                 

js:
<script language="javascript" type="text/javascript">

function getsensitive() {

 var ddpage = first; var sensitiveword = document.getElementById("sensitiveword").value; alert(sensitiveword ); var sensitivetype = document.getElementById("sensitivetype").value; alert(sensitivetype ); if ((sensitiveword == "")&&(sensitivetype == "")) {     alertify.alert("查询条件不能为空"); } else {     if ((sensitiveword != "")||(sensitivetype != "")) {         $.ajax({             url : "sensitive.servlet?action=select&sensitiveword=" + sensitiveword                     + "&sensitivetype=" + sensitivetype + "&ddpage="+ddpage,             type : "POST",             //async : false,             beforeSend : function() {                 showDiv();             },             complete : function() {                 closeDiv();             }         });     } }

}

</script>

点击没有反应,不触发 alert也没有反应。看看哪里错了。。

2条回答
EOW - 这个人很懒,什么都没留下
2016-10-14 15:00 .采纳回答

你代码这一句,仔细看看0.0
var sensitivetype = document.getElementById("sensitivetype").value();

一周热门 更多>