$(function () {
var options = {
url: "http://www.imooc.com/data/form_f.php",
target: ".tip"
};
$('#frmV').ajaxForm(options);
});
var options = {
url: "http://www.imooc.com/data/form_f.php",
target: ".tip"
};
$('#frmV').ajaxForm(options);
});
2017-11-18
自己在自己的电脑上就不要写http://www.imooc.com/data/fruit_part.html了,这个是要跨域的,肯定是显示不出来的,要不charles代理一波
2017-11-18
The event .load() method conflicted with the ajax .load() method. The .error() method could not be used with window.onerror because of the way the DOM method is defined. If you need to attach events by these names, use the .on() method, e.g. change $("img").load(fn) to $("img").on("load", fn).
2017-11-16
$(function () {
var intR = 0, intG = 0, intB = 0, strColor;
$("input").each(function(index){//这句是必须的
$(this).spinner({}); //这句也是必须的,注意最后的尾括号
});
var intR = 0, intG = 0, intB = 0, strColor;
$("input").each(function(index){//这句是必须的
$(this).spinner({}); //这句也是必须的,注意最后的尾括号
});
2017-11-13
$(function () {
$("#x").draggable({containment:"parent",axis:"x"});
$("#y").draggable({containment:"parent",axis:"y"});
});
$("#x").draggable({containment:"parent",axis:"x"});
$("#y").draggable({containment:"parent",axis:"y"});
});
2017-11-13
$("#btnCount").bind("click", function () {
$("#Text3").val(
$.subNum(parseInt($("#Text1").val()),parseInt($("#Text2").val()))
);
});
$("#Text3").val(
$.subNum(parseInt($("#Text1").val()),parseInt($("#Text2").val()))
);
});
2017-11-13
<script>
var jsonStu =[{"name":"小赵","score":80},{"name":"小钱","score":87},{"name":"小孙","score":97}];
$.each(jsonStu,function(index,student){
$("#list").append("<li>姓名:"+student["name"]+" 分數:"+student["score"]+"</li>");
});
</script>
var jsonStu =[{"name":"小赵","score":80},{"name":"小钱","score":87},{"name":"小孙","score":97}];
$.each(jsonStu,function(index,student){
$("#list").append("<li>姓名:"+student["name"]+" 分數:"+student["score"]+"</li>");
});
</script>
$.ajaxSetup({
type:"POST",
success: function (data) {
type:"POST",
success: function (data) {
2017-11-13
$.getScript("http://www.imooc.com/data/sport_f.js",function ()
2017-11-12
可以看这两篇:http://www.cnblogs.com/ajianbeyourself/p/5815689.html 和 http://www.cnblogs.com/xcj26/p/3345556.html
已采纳回答 / Neopolitan
if($.cookie('email')) 判断cookie中是否有‘email’$('#email').val($.cookie('email'));如果有,就把cookie中email的值提取出来,让‘id=email’的值 = cookie中email的值,这也是常用的‘记住我的用户名’。下面的代码就是设置你的cookie。你也可以找找cookie有关的资料看看。
2017-11-09