---
title: "jquery使用笔记一"
author: "cainwise"
date: "2008-09-10T20:56:42Z"
tags: []
slug: "jquery"
draft: false
lastmod: "2008-09-10T20:56:42Z"
id: 240338
url: "https://cainwise.iteye.com/blog/240338"
---

首先新建一个a.html页面

```
<html>
<head>
<title>
jquery test!
</title>
<link  rel="stylesheet"  type="text/css" href="aa.css"/>
<script type="text/javascript" src="jquery.js"></script>
<script>
function check(){
       var name=$("#name").val();
	if(name=="abc"){
		$("#mc").show();
	}
       alert(name);
}
</script>
</head>
<body>
	username:<input type="text" id="name"><br><b><span id="mc">ni shi shui</span></b>
	password:<input type="text" id="password"><br>
	<input type="submit" value="submit" onClick="check()">
</body>
</html>
```

 

然后再建立一个aa.css样式

 

```
#mc{ display:none;
}
```

 还有一个关键就是你要把jquery.js给加载进去

下面有个jquery.js的附件