$(function () {
$("#btnCount").bind("click", function () {
$("#Text3").val(
paseInt($("#Text1").val())-
paseInt($("#Text2").val())
);
});
});
自定义一个咯
$("#btnCount").bind("click", function () {
$("#Text3").val(
paseInt($("#Text1").val())-
paseInt($("#Text2").val())
);
});
});
自定义一个咯
2015-08-07
$("div").unbind("click dblclick");
2015-08-07
<script type="text/javascript">
$(function() {
$("li").each(function(){
$(this).mouseover(function(){
$(this).css("background-color","red");
});
$(this).mouseout(function(){
$(this).css("background-color","#fff");
})
});
})
</script>
其实自己写一个也很容易的。
$(function() {
$("li").each(function(){
$(this).mouseover(function(){
$(this).css("background-color","red");
});
$(this).mouseout(function(){
$(this).css("background-color","#fff");
})
});
})
</script>
其实自己写一个也很容易的。
2015-08-07
大家注意看教程, 别忘了toggle()还可以实现元素的隐藏与切换,实现这个效果不需要写方法的哈!!直接$("div").toggle()就行了。
2015-08-07
$("li:last-child").css("background-color", "blue");
2015-08-07
$("li:first-child").css("background-color", "green");
2015-08-07
$("li[title='蔬菜']").css("background-color", "green");
$("li[title=蔬菜]").css("background-color", "green");
明明说了不是属性名和属性值是等号而已不加引号以示区分,但是系统只认一个
$("li[title=蔬菜]").css("background-color", "green");
明明说了不是属性名和属性值是等号而已不加引号以示区分,但是系统只认一个
2015-08-07
$("li:visible").css("background-color","blue");
$("li").css("background-color","blue");
都行
$("li").css("background-color","blue");
都行
2015-08-07
$("span").empty(".green");// 清空 但是控件还在
$("span").remove(".green");// 连控件一起移除
$("span").remove(".green");// 连控件一起移除
2015-08-07