您的位置:首页 > Web前端 > JQuery

多个js引用同一个jquery 避免冲突

2014-12-05 13:45 141 查看
<script type="text/javascript">

var $j = jQuery.noConflict(); //自定义一个比较短快捷方式 防止jquery 命名冲突

// $j(document).ready(function () {

$j.ajax({

type: "POST",

url: "WebService.asmx/GetPubThumbSlider",

dataType: "json",

data: "{SL:'10'}",

contentType: "application/json; charset=utf-8",

async: true,

success: function (response) {

$j("#pubThumb").html(response.d);

},

error: function (request, status, error) {

alert("寄语提取数据错误!");

}

});

// });

</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: