$("li:gt(4)").not(":last").css("display","none");
$("a").click(function(){
if($(this).text()=="更多"){
$(this).text("简化");
$("li").show();
}else{
$(this).text("更多");
$("li:gt(4)").not(":last").css("display","none");
}
});
$("a").click(function(){
if($(this).text()=="更多"){
$(this).text("简化");
$("li").show();
}else{
$(this).text("更多");
$("li:gt(4)").not(":last").css("display","none");
}
});
已采纳回答 / COO1
$(function () { $.get("http://www.imooc.com/data/info_f.php",function(data) { $("ul").append("<li>我的名字叫:" + data.name + "</li>"); $("ul").append("<li>男朋友对我说:" + data.say +...
2015-05-19
注意是有2个 ? 号,如果在第一个问号那把
url:"http://www.imooc.com/data/check.php",
type:"post",
datatype:"text",
都写上,别忘了把第二个问号删了。
url:"http://www.imooc.com/data/check.php",
type:"post",
datatype:"text",
都写上,别忘了把第二个问号删了。
2015-05-19
:image 图像域选择器 应该有一个前提是当<input>的type属性设置 所以对<img src="">没用,是这样吗?
2015-05-19
稍微有点难理解,如果jQuery把设置属性的方法名变成setAttr()可能会更好
<script type="text/javascript">
$("#a1").attr("href","www.imooc.com");
var $url = $("#a1").attr("href");
$("#tip").html($url);
</script>
<script type="text/javascript">
$("#a1").attr("href","www.imooc.com");
var $url = $("#a1").attr("href");
$("#tip").html($url);
</script>
2015-05-18