Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

After loading Webpage about WebBrowser control from the main window to jump to the sub window, through the JS to access elements between Webpage window

$
0
0

1.html

<html>

<html>

<head>

<head>

<meta
http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="Content-Type"
content=
"text/html; charset=UTF-8">

<title>JSP Page</title>

<title>JSP Page</title>

<script type="text/javascript">

<script type="text/javascript">

var
a;

Var a;

window.onload=function()

Window.onload=function ()

{

{

//
a=window.open("aaa.jsp");

a=window.open ("aaa.jsp");

}

}

function
aaa()

 function aaa()

{

{

//alert('');

a.document.getElementById("as").innerHTML="asdasdsad";

a.document.getElementById ("as").InnerHTML="asdasdsad";

}

}

</script>

</script>

</head>

</head>

<body>

<body>

<a
href="aaa.jsp" target="_blank" id="as">aaaaaa</a>

<a href="aaa.jsp" target="_blank" id="as">aaaaaa</a>

</body>

</body>

</html>

</html>

2.html

2.html

<html>

<html>

<head>

<head>

<meta
http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="Content-Type"
content=

"
text/html;
charset=UTF-8
">

<title>JSP Page</title>

<title>JSP Page</title>

</head>

</head>

<script type="text/javascript">

<script type="text/javascript">

function
aaa()

function aaa()

{

{

//alert('');

//alert ('');

window.opener.document.getElementById("as").innerHTML="asdasdsad";

Window.opener.document.getElementById ("as").InnerHTML="asdasdsad";

}

}

</script>

</script>

<body>

<body>

<h1
onclick="aaa()" id="af">aaa</h1>

 <h1 onclick="aaa()"
id=
"AF">aaa</h1>

</body>

</body>

</html>

</html>

使用webbrowser跳转以后,当我点击2.html的<h1>标签时脚本提示window.opener为空,使用windows
ie能够正常读取和修改1.html<a>标签的元素,请问这个问题怎么解决

After using the WebBrowser jump, when I click on the 2.html<h1> tab script prompts the window.opener is empty, the use of windows ie can read and modify 1.html<a> tag elements, may I ask how to solve this problem


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>