开发者

Js works in IE, Chrome but not Firefox

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Remote Control</title>
  </head>
<link rel="stylesheet" href="/../.." type="text/css" />
<title>page title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<SCRIPT LANGUAGE="JavaScript" SRC="popup.js" > </script> <!-- <---- Problem, doesn't work in FF but ok in IE/Chrome -->
<body>

The script doesn't execute on Firefox like it does on IE and chrome. Why is this?

Could anyone tell me what 开发者_如何学编程needs to be done to make it work in FF?


Your popup.js file is full of references to a method called document.getelementbyid. There is no such method in JavaScript because its a case-sensitive language and thats the reason your code breaks right at the beginning of the hidep1() function.:

if (document.getelementbyid) {

Replace all occurrences of getelementbyid with getElementById and try again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜