<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script class="jquery library" src="/js/sandbox/jquery/jquery-1.8.2.min.js" type="text/javascript"></script>
<title>
RunJS 演示代码
</title>
<script>
$(function(){
$("div").toggle(function(){
$(this).css("backgroundColor","red");
},function(){
$(this).css("backgroundColor","blue");
});
})
</script>
</head>
<body>
<div style="background-color:blue">
sdfsdf
</div>
</body>
</html>
追问太感谢了亲,么么哒哦