discuz 重新定义jquery的$

最近做个小插件

发现加了这个代码不执行:

$.ajax({
              url:'plugin.php?id=register:regeist_jiangsu',
              type:'post',
              data:{
                'mobile':oMobile.value,
              },
              dataType:'json',
              async:false,
              success:function(data) {
                if (data.status == 1) {
                  myform.mobile.focus();
                  alert('本社区仅限江苏移动的用户注册哦!');
                  a= false;
                }
              }
            });

 

原来是disucz把jq重新封装了,$替换成jQuery,就OK了

 

jQuery.ajax({
url:'plugin.php?id=register:regeist_jiangsu',
type:'post',
data:{
'mobile':mobile,
},
dataType:'json',
async:false,
success:function(data) {
if (data.status == 1) {
errormessage('mobile', '本社区仅限江苏移动的用户注册哦!');return;
}
}
});

 

posted @ 2016-01-22 15:01  pthlp  阅读(422)  评论(0编辑  收藏  举报