Javascript 将值从一个域传递到另一个域
要将值从一个域传递到另一个域,我尝试通过查询字符串传递它,但该值包含大量字符,因此无法使用查询字符串获取所有值,请告诉我如何才能做到这一点 下面是将值传递给另一个域的代码Javascript 将值从一个域传递到另一个域,javascript,vbscript,Javascript,Vbscript,要将值从一个域传递到另一个域,我尝试通过查询字符串传递它,但该值包含大量字符,因此无法使用查询字符串获取所有值,请告诉我如何才能做到这一点 下面是将值传递给另一个域的代码 var iframe='<iframe src="'+url_to_download+'" style="display:none;" frameborder="0" scrolling="no" width="0px" height="0px"></iframe>'; var-iframe='';
var iframe='<iframe src="'+url_to_download+'" style="display:none;" frameborder="0" scrolling="no" width="0px" height="0px"></iframe>';
var-iframe='';
下面是从查询字符串中读取传递值的代码
<%
orders=request.QueryString("ordered_products")
orders=replace(orders,"-aspx",".aspx")
orders=replace(orders,"_","&")
'urlredirect=request.QueryString("url")
cooki=request.Cookies("products_ordered")
orderid=request.QueryString("orderid")
response.Write("<script>alert('"&orders&"')</script>")
%>
您可以将数据组装成JSON,并使用jQuery的JSONP功能从domain2上的domain1请求数据 使用一个输入类型隐藏的表单,将目标设置为iframe和method=post,然后使用js中的document.getElementById(“您的表单”).submit()
发送所需的值我确信这是许多帖子的重复。