jquery自定义类似$.ajax()的方法实现代码
人气:0
热腾腾的代码:
<script type="text/javascript">
$.extend({
testgogo: function (options) {
var defaults = {
name:"Charles",
year:"22",
say:"Sandy is so beautiful!"
};
var opts = $.extend(defaults, options);
alert(defaults.name+"说:"+defaults.say);
}
});
$.testgogo({ });
</script>
复制代码 代码如下:
<script type="text/javascript">
$.extend({
testgogo: function (options) {
var defaults = {
name:"Charles",
year:"22",
say:"Sandy is so beautiful!"
};
var opts = $.extend(defaults, options);
alert(defaults.name+"说:"+defaults.say);
}
});
$.testgogo({ });
</script>
加载全部内容