返回jquery基......登陆

jquery基础语法

肖凌2019-05-19 20:55:00188

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>jquery基础语法</title>

<script type="text/javascript" src="jquery-3.3.1.min.js"></script>

<style type="text/css">

div{width:200px;height:200px;border:1px solid red;}

</style>

</head>

<body>

<div></div>

<button class="hide">隐藏</button><button class="show">显示</button><button class="BgColor">换色</button>

<script>

$(document).ready(function(){

$mStr="jquery的字符串变量";

console.log($mStr);

$('.hide').click(function(){

$('div').hide();

})

$('.show').click(function(){

$('div').show();

})

$('.BgColor').click(function(){

$('div').css('background-color','red');

})



})

</script>


</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送