网页对话框showModalDialog()

网页对话框的应用:
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刷新父窗口
1
opener.document.forms[0].submit();

2
opener.parent.frames["left"].location.reload();

3
parent.frames["left"].location.reload();
























你可能感兴趣的:(JavaScript,html)