没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
1.在跳转后的页面加以下代码可以自动调整页面大小
window.onload = function()
{
if( document.body.scrollWidth > (window.screen.availWidth-100) ){
window.dialogWidth = (window.screen.availWidth-100).toString() + "px"
}else{
window.dialogWidth = (document.body.scrollWidth +50).toString() + "px"
}
if( document.body.scrollHeight > (window.screen.availHeight-70) ){
window.dialogHeight = (window.screen.availHeight-50).toString() + "px"
}else{
window.dialogHeight = (document.body.scrollHeight +115).toString() + "px"
}
window.dialogLeft = ((window.screen.availWidth - document.body.clientWidth) / 2).toString() + "px"
window.dialogTop = ((window.screen.availHeight - document.body.clientHeight) / 2).toString() + "px"
}
2.返回多个参数值
//在原来页面的跳转方法中
function turn_pyxz(){
var l_Features="dialogHeight:0px;dialogWidth:0px;";
var returnvalue=window.showModalDialog("Invoice_FPSource.html", l_Features);
document.getElementById('fpzldm').value=returnvalue.split(",")[0];
document.getElementById('get_fphm').value=returnvalue.split(",")[1];
//在跳转后的页面的返回值方法中
function get_returnvalue(){
returnValue=form.get_fpzldm.value+","+form.get_fphm.value;
window.close();
window.onload = function()
{
if( document.body.scrollWidth > (window.screen.availWidth-100) ){
window.dialogWidth = (window.screen.availWidth-100).toString() + "px"
}else{
window.dialogWidth = (document.body.scrollWidth +50).toString() + "px"
}
if( document.body.scrollHeight > (window.screen.availHeight-70) ){
window.dialogHeight = (window.screen.availHeight-50).toString() + "px"
}else{
window.dialogHeight = (document.body.scrollHeight +115).toString() + "px"
}
window.dialogLeft = ((window.screen.availWidth - document.body.clientWidth) / 2).toString() + "px"
window.dialogTop = ((window.screen.availHeight - document.body.clientHeight) / 2).toString() + "px"
}
2.返回多个参数值
//在原来页面的跳转方法中
function turn_pyxz(){
var l_Features="dialogHeight:0px;dialogWidth:0px;";
var returnvalue=window.showModalDialog("Invoice_FPSource.html", l_Features);
document.getElementById('fpzldm').value=returnvalue.split(",")[0];
document.getElementById('get_fphm').value=returnvalue.split(",")[1];
//在跳转后的页面的返回值方法中
function get_returnvalue(){
returnValue=form.get_fpzldm.value+","+form.get_fphm.value;
window.close();
资源评论
yangyusen814
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功