jQuery基本语法练手

Original 2019-02-06 17:58:51 257
abstract:在这节课我在写的时候犯了很严重的一个错误。路径错了。致命呀。半个多小时才找到问题。路程还远着呢,还需努力。路径对了,怎么都好弄。呵呵<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport&qu

在这节课我在写的时候犯了很严重的一个错误。路径错了。致命呀。半个多小时才找到问题。路程还远着呢,还需努力。路径对了,怎么都好弄。呵呵

<!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>Document</title>

<script src="jquery/jquery-3.3.1.js"></script>

</head>

<body>

<script>

$(document).ready(function(){

/* $str='我是一个变量';

           alert($str); */

$('#yc').click(function(){

$('.box').hide();

})

$('#xs').click(function(){

$('.box').show();

})

})

</script>

<style>

.box{width: 200px;height: 200px;background: pink;margin: 50px;}

</style>

<div class="box"></div>

<button id="xs">显示</button>

<button id="yc">隐藏</button>

</body>

</html>


Correcting teacher:灭绝师太Correction time:2019-02-11 09:33:25
Teacher's summary:有错误是好事情 , 继续加油 , 学习进度不错

Release Notes

Popular Entries