$("#default").html()=$("#divtest").html();
2016-06-22
$("form *").attr("disabled","");這樣也能通過 為甚啊
2016-06-22
<script type="text/javascript">
$(function () {
$("select").bind("change", function () {
if ($(this).val() == "蘋果")
$(this).css("background-color", "red");
else
$(this).css("background-color", "green");
})
});
</script>
$(function () {
$("select").bind("change", function () {
if ($(this).val() == "蘋果")
$(this).css("background-color", "red");
else
$(this).css("background-color", "green");
})
});
</script>
2016-06-22
$(function () {
$("input")
.bind("focus", function () {
$("div").html("請輸入您的姓名!");
})
這后面講的我看的好困難啊
.bind("blur", function () {
if ($(this).val().length == 0)
$("div").html("你的名稱不能為空!");
})
});
$("input")
.bind("focus", function () {
$("div").html("請輸入您的姓名!");
})
這后面講的我看的好困難啊
.bind("blur", function () {
if ($(this).val().length == 0)
$("div").html("你的名稱不能為空!");
})
});
2016-06-22
$(function () {
$("div").bind("change-color", function () {
$(this).addClass("color");
});
$("div").trigger("change-color");
});
這顏色不看評論完全不知道有木有效果
.color
{
color: red;
}改個代碼好看點
$("div").bind("change-color", function () {
$(this).addClass("color");
});
$("div").trigger("change-color");
});
這顏色不看評論完全不知道有木有效果
.color
{
color: red;
}改個代碼好看點
2016-06-22
<script type="text/javascript">
$(function () {
var intI = 18;
$("div").one("click", function () {
intI++;
$(this).css("font-size", intI + "px");
})
});
</script>這樣看的夠清楚了吧,哈哈哈哈哈
$(function () {
var intI = 18;
$("div").one("click", function () {
intI++;
$(this).css("font-size", intI + "px");
})
});
</script>這樣看的夠清楚了吧,哈哈哈哈哈
2016-06-22
<script type="text/javascript">
$(document).ready(function(){
$("#btntest").bind("click", function () {
$("#tip").html("我被點擊了!");
});
});
</script>
$(document).ready(function(){
$("#btntest").bind("click", function () {
$("#tip").html("我被點擊了!");
});
});
</script>
2016-06-22