没有合适的资源?快使用搜索试试~ 我知道了~
jquery异步方式请求
需积分: 26 6 下载量 86 浏览量
2011-03-30
15:07:44
上传
评论
收藏 4KB TXT 举报
温馨提示
试读
4页
使用jquery异步请求方式发送数据,几种方式
资源推荐
资源详情
资源评论
1.方式一:
function callFlex(pkId, code) {
//$('#tab').innerHTML= 'asdasdasdasd';
signId = pkId;
singCode = code;
$("#hidCode").val(pkId);
var bigArea = $("#bigArea").val();
var province = $("#province").val();
var city = $("#city").val();
$.get("imageList_action.action",{bizId:pkId, code:code, bigArea:bigArea, province:province, city:city},function(re){
if(re) {
var images = '';
//var images = '<div class="pro1" ><div id="myGis"><embed src="<%=basePath %>FlexViewer-debug/index.swf" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="789" height="700"></embed></div>';
var creator = '<span id="tab1" onclick=displayDiv("pro1","tab1")>国家公共服务中心</span>';
var json = eval(re);
var pwsPrProProduct = json.pwsPrProProduct;
//alert("productPath:" + pwsPrProProduct.productPath);
var imageList = json.imageList;
//alert(imageList);
flag = imageList.length;
//alert(flag);
for(var i=0;i<imageList.length;i++) {
//alert(imageList[i].fullName);
//alert(imageList[i].cccc);
images = images + '<div id="pro' + (i+2) + '" class="pro' + (i+2) + '" ><img id="hidImg' + (i+2) + '" src="<%=basePath %>' + imageList[i].fullName + '" width="800" height="700" /></div>';
creator = creator + '<span id="tab' + (i+2) + '" onclick=displayDiv("pro' + (i+2)+ '","tab' + (i+2) + '")>' + imageList[i].cccc + '</span>';
function callFlex(pkId, code) {
//$('#tab').innerHTML= 'asdasdasdasd';
signId = pkId;
singCode = code;
$("#hidCode").val(pkId);
var bigArea = $("#bigArea").val();
var province = $("#province").val();
var city = $("#city").val();
$.get("imageList_action.action",{bizId:pkId, code:code, bigArea:bigArea, province:province, city:city},function(re){
if(re) {
var images = '';
//var images = '<div class="pro1" ><div id="myGis"><embed src="<%=basePath %>FlexViewer-debug/index.swf" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="789" height="700"></embed></div>';
var creator = '<span id="tab1" onclick=displayDiv("pro1","tab1")>国家公共服务中心</span>';
var json = eval(re);
var pwsPrProProduct = json.pwsPrProProduct;
//alert("productPath:" + pwsPrProProduct.productPath);
var imageList = json.imageList;
//alert(imageList);
flag = imageList.length;
//alert(flag);
for(var i=0;i<imageList.length;i++) {
//alert(imageList[i].fullName);
//alert(imageList[i].cccc);
images = images + '<div id="pro' + (i+2) + '" class="pro' + (i+2) + '" ><img id="hidImg' + (i+2) + '" src="<%=basePath %>' + imageList[i].fullName + '" width="800" height="700" /></div>';
creator = creator + '<span id="tab' + (i+2) + '" onclick=displayDiv("pro' + (i+2)+ '","tab' + (i+2) + '")>' + imageList[i].cccc + '</span>';
资源评论
xiaoshufaya123
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功