标签:interval query red 解决方法 包含 ict 区域 样式表 disable
$(document).ready(function(){ //jQuery代码 console.log($(":input:disabled")), });
$("div")[0].onclick(function(){}); $("div").get(0).onclick(function(){});
var div=document.getElementsByTagName("div"); $(div).click(function(){});
!function($){ //在自执行函数中,可以使用&替代jQuery //除自执行函数外的其他区域,禁止jQuery使用$ }(jQuery);
$("#div1").attr("class","cls")
$("#div1").attr({ "class" :$("#div1").attr("class")+" cls1" "name":"name1" "style":"font-size:20px;color:red;"
})
$("button:eq(0)").click(function(){ var id = setInterval(function(){ $("#div1").css({ "width":function(index,value){ var v = parseFloat(value) + 1; if(v>600){ clearInterval(id); } return v+"px"; } }); },10); });
console.log($("#div1").attr("id"));
$("#div1").removeAttr("class")
console.log($("input:eq(0)").attr("disabled"))
console.log($("input:eq(0)").prop("disabled"))
$("#div1").addClass("cls")
$("#div1").removeClass("cls")
$("button:eq(0)").click(function(){ $("#div1").toggle("div1") })
console.log($("#div1").html("<p>555</p>").html()) console.log($("#div1").text("<p>555</p>").text()) console.log($("input").val("<p>6666</p>").val())
$("#div1").css("color","#008000")
$("#div1").css(function(){ "color":"#008000" "font-size":"20px" })
$("#div1").width("400px")
$("#div1").height(400)
$("#div1").innerHeight()
$("#div1").ininnerWidth()
console.log($("#div1").outerHeight()) console.log($("#div1").outerWidth(true))
console.log($("#div1").offset())
console.log($("#div1").position())
$("#div1").scrollTOp()
$("#div1").scrollLeft()
$("#ul li").each(function(index,value){ console.log(index) console.log($(value).text())
console.log(this) $(this).text($(value).text()+"qqq") })
console.log($("#ul li").size())
console.log($("#ul li").length)
console.log($("#ul li").get())
$.each($("li"),function(index,value){ console.log(index) console.log(value) })
var arr=[1,2,3,4] var newarr=$.map(arr,function(index,value){ return value+5; }) console.log(newarr)
var arr=[1,2,3,4] var is=$.Array(2,arr,3) console.log(arr.indexOf(2,3)) console.log(is)
console.log($("#ul li").toArray())
var arr=$.merge( [0,1,2], [2,3,4] ) console.log(arr)
var str=‘{"":"","":"","":"","":"","":"","":""}‘ console.log(str) console.log($.parseJSON(str)) });
console.log($.contains($("#ul")[0],$("#li")[0]))
console.log($.contains($("#li")[0],$("#ul")[0]))
标签:interval query red 解决方法 包含 ict 区域 样式表 disable
原文地址:https://www.cnblogs.com/fylong/p/8999743.html