日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

JQuery的ajax的用法在asp中使用$.ajax()實(shí)現(xiàn)_AJAX教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:Ajax二級(jí)聯(lián)動(dòng)菜單實(shí)現(xiàn)原理及代碼
二級(jí)聯(lián)動(dòng)菜單,一個(gè)多么方便且實(shí)用的用戶交互功能,有需求的朋友可以參考下本文,或許對(duì)你的菜單知識(shí)深入學(xué)習(xí)有幫助,好了,閑話不多說(shuō),看代碼吧

復(fù)制代碼 代碼如下:hl5o.cn

<%
response.Expires=-1
response.CacheControl="no-cache"
%>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../psw.asp"-->
<!--#include file="../../functions/dofunction.asp"-->
<!--#include file="../../functions/showfunction.asp"-->
<!--#include file="../../fqdb/admin/website.asp"-->
<%
cmd = checkstr(request("cmd"),2)
if cmd="loadteacher" then
response.Charset = "gb2312"
set rs=server.CreateObject("adodb.recordset")
sql="select teacher_id,name from Edu_Person"
rs.open sql,conn,1,3
response.write "{""data"":["
i = 0
do until rs.eof
i = i + 1
response.write "{""Id"":"&rs("teacher_id")&",""Name"":"""&rs("name")&"""}"
if i<rs.recordcount then response.write ","
rs.movenext()
loop
response.write "]}"
response.End()
end if
%>

復(fù)制代碼 代碼如下:hl5o.cn

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無(wú)標(biāo)題文檔</title>
<script type="text/javascript" src="../../js/common/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#btn1").click(function(){
//alert("click");
$.ajax({
url:"ajaxtest.asp?cmd=loadteacher",
dataType:"json",
success:function(json){
//var odata = $.parseJSON(json);
var data = json.data;
for(var i = 0,len = data.length;i<len ;i++){
document.writeln(data[i].Name);
}
}
});
});
});
</script>
</head>
<body>
<form id="myform" method="post" action="ajaxtest.asp">
<!--<input type="hidden" name="cmd" value="loadteacher">-->
<select id="tearchers" name="teachers">
<option value="請(qǐng)選擇"></option>
</select>
<input type="button" id="btn1" name="btn1" value="加載老師">
<!--<input type="submit" value="提交">-->
</form>
</body>
</html>

分享:Ajax方式提交帶文件上傳的表單及隱藏iframe應(yīng)用
一般的表單都是通過(guò)ajax方式提交,所以碰到帶文件上傳的表單就比較麻煩,基本原理就是在頁(yè)面增加一個(gè)隱藏iframe,然后通過(guò)ajax提交除文件之外的表單數(shù)據(jù),感興趣的你不妨了解一下,或許本文對(duì)你有所幫助

來(lái)源:模板無(wú)憂//所屬分類:AJAX教程/更新時(shí)間:2013-04-22
相關(guān)AJAX教程