52,792
社区成员




function dlgopen1() {
$.dialog({
id: 'id001',
title: '确认订单',
width: 700,
height: 500,
lock: true,
max: false,
min: false,
content: 'url:test.aspx' //我想POST数据到test.aspx这个页面
});
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http://elonan.com/test/jquery-1.7.2.min.js"></script>
<script src="http://elonan.com/test/lhgdialog/lhgdialog.min.js?self=false"></script>
<script type="text/javascript">
function dlgopen1() {
$.dialog({
id: 'id001',
title: '确认订单',
width: 700,
height: 500,
lock: true,
max: false,
min: false,
content: 'url:http://elonan.com/test/test.asp' //我想POST数据到test.aspx这个页面
});
}
</script>
</head>
<body>
<form action="http://elonan.com/test/test.asp" target="id001" method="post">
<input id="name" name="name" type="text" />
<br />
<input id="Button_open" type="button" onclick="javascript:dlgopen1();" value="post input到test.asp"
name="Button_open" />
</form>
</body>
</html>
测试脚本:http://elonan.com/test/test.rar
版主能帮我测试下吗?完全没有效果啊。
function dlgopen1() {
$.dialog({
id: 'id001',
title: '确认订单',
width: 700,
height: 500,
lock: true,
max: false,
min: false,
init: function () {
if (window.ActiveXObject) { //IE直接替换掉原来的iframe
var pNode = lhgdialog.list['id001'].iframe.parentNode;
pNode.removeChild(lhgdialog.list['id001'].iframe)//删除原来的iframe
$('<iframe name="id001" style="width:100%;height:100%;border:none 0;"></iframe>').appendTo(pNode);
}
document.postFrm.submit()
},
content: 'url:about:blank' //这个地址随便设置,主要为是了生成iframe用的,为了不和服务器交互,设置为about:blank
});
}