开发者社区 问答 正文

求助jquery form中的提交按钮用mouseover事件无反应?

js中的代码(试过2种选择器);
1.

 $(function(){      
     $("#submit").mouseover(function(){
         $(this).text("over");
             }).mouseout(function(){
         $(this).text("out");                    
             });
});

2.

 $(function(){      
     $(":submit").mouseover(function(){
         $(this).text("over");
             }).mouseout(function(){
         $(this).text("out");                    
             });
});

jsp中的代码(在form中的提交按钮):

 <INPUT type="submit" name="submit" id="submit" value="提交" class="button medium blue"  onclick="return validateDate();" 

展开
收起
吴孟桥 2016-06-02 15:30:43 2280 分享 版权
1 条回答
写回答
取消 提交回答
  • $(function(){
    console.log( $("#submit"))//打印对象看看

    然后用开发工具看下是不是被类库修改过dom对象了,是否有js错误

    2019-07-17 19:25:01
    赞同 展开评论