1、jQuery简单来说就是集成了绝大部分js常用方法的一个方法库,想要应用就应当引用这个库。
// 可以通过 script 标签进行引入
<script src="./js/jquery-1.12.4.js"></script>
2、在进行jQuery代码编辑时候应当注意:
如果代码文件在标签之后,则无需特别注明入口函数,但是若jQuery代码文件在之前则应当注明入口函数;
$(document).ready(function){ } //这是jQuery入口函数的复杂写法
$(function(){ }) //这是jQuery入口函数的简单写法
3、下面是我编撰的简单案例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>表格更新</title>
<style>
*{
margin: 0;
padding: 0;
}
/* .box0{
border:1px solid green;
position:absolute;
} */
.box1, .box2{
width: 1000px;
height: auto;
border: 1px solid rgb(146, 146, 146);
margin: 50px auto 30px;
/* position: relative;
top: 50px; */
}
.box1{
/* height:80px; */
padding:2%;
}
table{
width: 1000px;
height: auto;
border-spacing: 0px;
border-collapse: collapse;
}
tr th