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

使用AJAX返回WebService里的集合具體實(shí)現(xiàn)_AJAX教程

編輯Tag賺U幣

推薦:AJAX獲取服務(wù)器當(dāng)前時間及時間格式輸出處理
本文整理了關(guān)于AJAX獲取服務(wù)器當(dāng)前時間的知識,不會的朋友可以參考下哈,希望對你有所幫助

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

-------------------WebService1 -----------------------------
// 若要允許使用 ASP.NET AJAX 從腳本中調(diào)用此 Web 服務(wù),請取消對下行的注釋。
[System.Web.Script.Services.ScriptService]
public class WebService1 : System.Web.Services.WebService
{
[WebMethod]
public List<string> GetList()
{
List<string> list = new List<string>();
list.Add("王一");
list.Add("22");
list.Add("河北");
return list;
}
}
--------------------HTMLPage1.htm-----------------------
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="js/Jquery1.7.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#Button1').click(function () {
$.ajax({
type: "post",
contentType: "application/json",
url: "WebService1.asmx/GetList",
data: "{}",
success: function (result) {
var str = '';
for (var i = 0; i < result.d.length; i++) {
str += result.d[i];
}
$('#mydiv').text(str);
}
})
})
})
</script>
</head>
<body>
<div id="mydiv"></div>
<input id="Button1" type="button" value="button" />
</body>
</html>

分享:ajax傳遞多個參數(shù)具體實(shí)現(xiàn)
在使用ajax過程中,傳遞參數(shù)是在所難免的尤其在特殊情況下傳遞多個參數(shù),下面與大家分享下具體的是實(shí)現(xiàn)方法,感興趣的朋友可以參考下哈

來源:模板無憂//所屬分類:AJAX教程/更新時間:2013-05-22
相關(guān)AJAX教程