日期:2014-05-16 浏览次数:20644 次
01 |
////////////1、在HTML中,有这样一个表单: |
02 |
?? |
03 |
<form method="post" name="searchform" id="searchform" method="/sek.go">?
|
04 |
<input name="query" value="" type="text" id="query" />?
|
05 |
<input type=”submit” value="查询"></input>?
|
06 |
</form>? |
07 |
??? |
08 |
?? |
09 |
////////////当然,要想在HTML中使用Js功能,必须在<head/>中加入 |
10 |
?? |
11 |
<script type="text/javascript"src="/style/js/ajax.js"></script>?
|
12 |
??? |
13 |
?? |
14 |
////////////2、然后在ajax.js文件中加入如下代码 |
15 |
?? |
16 |
function userSearch(){??
|
17 |
|