Opera 10.7窗口位置问题

Opera 10.7 window.location issues

本文关键字:位置 问题 窗口 Opera      更新时间:2023-09-26

有人知道在Opera 10.7中使用window.location有什么问题吗。我似乎无法更改哈希、搜索,甚至href属性。它似乎完全忽略了我告诉它使用window.location.做的任何事情

在有人建议之前,不,升级到新版Opera不是一种选择。是的,我知道10.7并不是Opera的正式发行版本,但我不能选择是否使用它。

将其保存为whatever.xhtml,并确保没有使用BOM(字节顺序标记)保存,如果不确定,则使用SuperEdi(免费软件)保存,并在保存对话框中取消选中。

这应该是不言自明的,点击对象,它会为你列出所有与你一起使用的浏览器的子对象(我没有Opera 10.7的副本,因为它从未超过测试版本,它们直接进入Opera 11.0)

如果你需要帮助,请告诉我。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Opera 10.7</title>
<script type="application/javascript">
//<![CDATA[
function dom_list(o)
{
 if (eval(o)==undefined) {alert('Error: that is not a valid object.');}
 else if (document.getElementById(o) && document.getElementById(o).childNodes.length>1)
 {
  change_toggle(o+'_children','overflow','hidden');
 }
 else
 {
  var dom_list = new Array();
  for (var a in eval(o)) {dom_list.push(a);}
  dom_list.sort();
  if (eval('typeof '+o+'.'+dom_list[i])=='function') {ao = o+'()';}
  else {ao = o;}
  var d1 = document.createElement('div');
  d1.setAttribute('id',ao+'_children');
  for (var i=0; i<dom_list.length; i++)//
  {
   if (eval('typeof '+o+'.'+dom_list[i])=='function')
   {
    ao = o+'.'+dom_list[i]+'()';
    var ab = ao.split('()')[0];
    ah = 'javascript:try{alert('+ao+'+''/'n/'n''+'+ab+');} catch(err) {alert('+ab+'(''A test string.''));}';
   }
   else
   {
    ao = o+'.'+dom_list[i];
    ah = 'javascript:dom_list('''+ao+''');';
   }
   var d2 = document.createElement('div');
   d2.setAttribute('id',ao);
   var a1 = document.createElement('a');
   a1.setAttribute('href',ah);
   var n2 = document.createTextNode(ao);
   a1.appendChild(n2);
   d2.appendChild(a1);
   d1.appendChild(d2);
  }
  document.getElementById(o).appendChild(d1);
 }
}
function change(id,newClass)
{
 if (document.getElementById(id)) {document.getElementById(id).className=newClass;}
 else if (id) {id.className=newClass;}
 else {alert('Error: the id '''+id+''' was not found or has not yet been imported to the DOM.'n'nNew class intended: '+newClass);}
}
function change_toggle(id,c1,c2)
{
 if (document.getElementById(id))
 {
  if (document.getElementById(id).className==c2) {change(id,c1);}
  else {change(id,c2);}
 }
 else {alert('Error: the id '''+id+''' was not found or has not yet been imported to the DOM.');}
}
//]]>
</script>
<style type="text/css">
/*<![CDATA[*/
.hidden {display: none;}
a {font-size: 20px;}
a:hover {color: #000;}
div {margin: 4px;}
/*]]>*/
</style>
</head>
<body>
<div id="window.location"><a href="javascript:dom_list('window.location');">window.location</a></div>
</body>
</html>