jq基础语法
温度。2019-04-02 10:18:01179<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jquery基础</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
</head>
<body>
<button>body</button>
<script type="text/javascript">
$(function(){
$('body').css('background','pink');
$color = '#';
$color2 = Math.floor(Math.random()*10).toString()+Math.floor(Math.random()*10);
$color3 = Math.floor(Math.random()*10).toString()+Math.floor(Math.random()*10);
$color4 = Math.floor(Math.random()*10)+''+Math.floor(Math.random()*10);
$color += $color2+$color3+$color4;
console.log($color);
$('button').click(function(){
$('body').css('background',$color);
})
})
</script>
</body>
</html>