IWebBrowser2使用Navigate2打开的一个网页,网页里的js代码无效,使用IE和Chrome完全正常,尝试把js代码放到外部也不行,有没有遇到过类似情况 的,求大神们帮帮忙!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- saved from url=(0022)http://internet.e-mail -->
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<SCRIPT language=javascript>
<!--
window.onerror = function() { return true; }
// -->
</SCRIPT>
<title>language</title>
<style type="text/css">
* { margin:0; padding:0;}
body { line-height:22px; font-size:13px; color:#fff; background:#000; overflow:hidden;}
.select_box{color:#444;position:absolute;width:210px;height:28px;font-size:12px;background-image:url(SPANISH.png);}
.selet_open{display:inline-block;border-left:solid 1px #E5E5E5;position:absolute;right:0;top:0;width:30px;height:28px;background-image:url(choiceBtn.png);}
.option{width:180px;border:solid 1px #EDE7D6;position:absolute;top:28px;left:-1px;z-index:2;overflow:hidden;display:none;}
.option a{display:block;height:28px;line-height:28px;text-align:left;width:100%;}
#ESP{background:url(SPANISH.png);}
#FOR{background:url(PORTUGUESE.png);}
.option a:hover{background:#FDE0E5;}
</style>
<script src="jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".select_box").click(function(event) {
event.stopPropagation();
$(this).find(".option").toggle();
$(this).parent().siblings().find(".option").hide();
});
$(document).click(function(event) {
var eo = $(event.target);
if ($(".select_box").is(":visible") && eo.attr("class") != "option" && !eo.parent(".option").length)
$('.option').hide();
});
$(".option a").click(function() {
var value = $(this).attr("id");
switch ($(this).attr("id")) {
case "ESP":
document.getElementById("select_box").style.backgroundImage = "url(SPANISH.png)";
break;
case "FOR":
document.getElementById("select_box").style.backgroundImage = "url(PORTUGUESE.png)";
break;
}
document.getElementById("select_value").value = value;
alert(document.getElementById("select_value").value);
});
})
</script>
</head>
<body scroll="no" background-color="transparent" oncontextmenu=self.event.returnValue=false>
<div class="select_box" id="select_box">
<a class="selet_open"></a>
<div class="option">
<a id="ESP"></a>
<a id="FOR"></a>
</div>
</div>
<input type="hidden" id="select_value" />
</body>
</html>