这里注意一下,如果我们像其他页面中注入这一套代码 如果是一些简单的网站 就能显示出id来了,那么我们是不是就能根据id做一些事情了呢
2016-01-19
$("#frmTest :checkbox").attr("disabled","true");
2016-01-19
var choosenOne = $("li:gt(3):not(:last)");choosenOne.hide();//console.log(choosenOne);
$("a").click(function(){
if (choosenOne.is(":hidden")) {
$(this).text('简化');choosenOne.show();
} else {
$(this).text('更多');choosenOne.hide();}
});
$("a").click(function(){
if (choosenOne.is(":hidden")) {
$(this).text('简化');choosenOne.show();
} else {
$(this).text('更多');choosenOne.hide();}
});
<script type="text/javascript">
$(function () {
$("#btntest").bind("click", function () {
$('#btntest').toggle(
function(){$(this).style.backgroundColor = 'red';},
function(){$(this).style.backgroundColor = 'blue';}
);
}); </script>
$(function () {
$("#btntest").bind("click", function () {
$('#btntest').toggle(
function(){$(this).style.backgroundColor = 'red';},
function(){$(this).style.backgroundColor = 'blue';}
);
}); </script>
2016-01-18