熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

用Javascript實現父窗體的更新

2022-06-13   來源: JSP教程 

  ResponseWrite(<script language=javascript>windowopenerlocation=windowopenerlocationhref;</script>)

  第一種方案是
file

  function OpenDialog(urlparam)
{
return windowopen(urlparam DialogWidth:px;DialogHeight:px;help:no;status:no);
}

  file
<script language=javascript>
function js_do(val)
{
selfopenerdocumentallfilenamevalue=val
}
</script>

  第二種方案是
file
<html>
<script language=javascript>
function OpenDialog(urlparam)
{
       return windowshowModalDialog(urlparam DialogWidth:px;DialogHeight:px;help:no;status:no);
}

  function js_getData(url)
{
return OpenDialog();
}

  </script>
<body>
<form name=myFrm>
<input type=text name=filename onclick=thisvalue=js_getData()>
</form>
</body>
</html>

  file

  <html>
<script language=javascript>
function js_do(val)
{
windowreturnValue=val;
windowclose();
}
</script>
<body>
<form name=myFrm>
<input type=text name=filename>
<input type=text name=btnDo onclick=js_do(thisformfilenamevalue)>
</form>
</body>
</html>

  ResponseWrite(<script language=javascript>windowopenerdocumentalltxtvalue=+theValue+;</script>);


From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19192.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.