jQuery基础语法

原创2019-06-19 11:00:59142
摘要:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

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

<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>

</head>

<body>



<script>

// $(选择器).操作方法()



$(document).ready(function(){

//隐藏div

$('div').hide();

// 点击按钮显示div

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

$('div').show();

})



})

</script>

<button>点击显示</button>

<div style="width: 150px;height: 100px;background: aquamarine;">


</div>

</body>

</html>



批改老师:天蓬老师批改时间:2019-06-19 13:11:46
老师总结:选择器与执行操作是jQ中的招牌动作....

发布手记

热门词条