一个样式:$("#content").css("name","value")
多个样式:$("#content").css({"name":"value","name":"value"})
多个样式:$("#content").css({"name":"value","name":"value"})
2016-02-24
:text选择的是单行的表单文本输入框元素, :text选择的是单行的表单文本输入框元素, :text选择的是单行的表单文本输入框元素
2016-02-24
<script type="text/javascript">
$("span").each(function (index) {
if (index == 1) {
$(this).addClass("focus");
}
});
</script>
我想知道为什么效果不出来?
$("span").each(function (index) {
if (index == 1) {
$(this).addClass("focus");
}
});
</script>
我想知道为什么效果不出来?
2016-02-24
remove()方法删除所选元素本身和子元素,该方法可以通过添加过滤参数指定需要删除的某些元素,而empty()方法则只删除所选元素的子元素。
2016-02-23
html()方法获取元素的HTML内容 原文中格式代码也一起获取 text()方法获取元素中的文本内容 不包含HTML格式代码
2016-02-23
:button选择器能获取且只能获取“type”属性值为“button”的<input>和<button>这两类普通按钮元素。
2016-02-23
$(function(){
$("#btnShow").click(function(){
var $this = $(this);
$.getScript("http://www.imooc.com/data/sport_f.js ",function(){
$this.attr("disabled","true");
});
});
});哪里出错了
$("#btnShow").click(function(){
var $this = $(this);
$.getScript("http://www.imooc.com/data/sport_f.js ",function(){
$this.attr("disabled","true");
});
});
});哪里出错了
2016-02-23