可采用iframe的JS调用父页面的JS

如:父页面的JS代码为

View Code
 1 function getValue() {
2 document.getElementById("MyFormLayer").style.display = "none";
3 var grid = document.getElementById("MainGrid");
4 if (grid != null) {
5 grid.style.display = "block"
6 }
7 var type = document.getElementById("IFRAME1").contentWindow.document.getElementById("TextBox1").value;//获取框架页面控件TextBox1的值,IFRAME1指框架ID
8 document.getElementById("TYPE").value = type;
9 document.getElementById("QUERY").click();//触发父页面QUERY按扭事件
10 }

框架页的JS代码为:
        function returnPath() {
            parent.window.getValue();
       }

相关文章:

  • 2022-12-23
  • 2021-10-20
  • 2021-12-31
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案