本文介绍了网页对话框showModalDialog()的用法,作为网页对话框打开的页面要处理相关数据,返回给父页面,javascript刷新父窗口,需要的朋友参考下。
网页对话框: 
 
var getValue = window.showModalDialog(url","",sFeatures); 
getValue:指代网页对话框的返回值 
sFeatures:指代网页对话框的风格参数: 
 
var sFeatures = "DialogHeight:320px;dialogWidth:550px;status:no;toolbar=no;menubar=no;location=no;BoardStyle=0;help:no;top=0;directories=no;"; 
在接收返回值时,应该判断返回值是否为空的情况。
作为网页对话框打开的页面要处理相关数据,返回给父页面: 
window.returnValue = "returnString"; 
window.returnValue 是固定的 
-------> 
使text框的内容居右显示的样式:
style="text-align:right"
javascript刷新父窗口:
 
opener.document.forms[0].submit();  
opener.parent.frames["left"].location.reload();  
parent.frames["left"].location.reload();