---
title: "Firefox 3.0.3 本地调试时权限问题"
author: "luolonghao"
date: "2008-10-30T23:05:35Z"
tags: []
slug: "firefox-3-0-3"
draft: false
lastmod: "2008-10-30T23:05:35Z"
id: 260286
url: "https://luolonghao.iteye.com/blog/260286"
---

link.html里有一个ID为hyperLink的输入框(INPUT)，在本地直接在浏览器打开，
IE6,Chrome,Opera没有问题，Firefox3却报"Error: Permission denied to get property"错误。通过HTTP服务器运行则没有问题。


```java

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<iframe id="test" name="test" width="400" height="400" src="./link.html"></iframe>
<input type="button" name="button" value="获得URL" onclick="javascript:getURL();">
<script type="text/javascript">
function getURL() {
	var doc = document.getElementById("test").contentWindow.document;
	var value = doc.getElementById("hyperLink").value;
	alert(value);
}
</script>
</body>
</html>

```