返回jQuery安......登陆

jQuery安装与用法

Time2018-11-12 23:33:54211

jQuery 是一个 JavaScript 库。

简化了JavaScript操作

$(document).ready(function(){}初始化

.hide()隐藏

.show显示

jQuery为  $=var


<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>jQuery练习</title>

<style>

.dex{

width: 200px; height: 200px;background: #D2691E;

}

</style>

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

<script>

$(document).ready(function(){

$('.dex').hide()

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

// alert('你好 我是弹窗!')

$('div').show()

})

})

</script>

</head>

<body>

<div class="dex"></div>

<button>点击</button>

</body>

</html>


最新手记推荐

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

全部回复(0)我要回复

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