【发布时间】:2010-03-31 13:23:17
【问题描述】:
我是 javascript 新手,有兴趣创建一个小型 o3d 脚本:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Game Website</title>
</head>
<body>
<script type="text/javascript" src="o3djs/base.js"></script>
<script type = "text/javascript" id="myscript">
o3djs.require('o3djs.camera');
window.onload = init;
function init(){
document.write("jkjewfjnwle");
}
</script>
<div align="background">
<div id="game_container" style="margin: 0px auto; clear: both; background-image: url('./tmp.png'); width: 800px; height:600px; padding: 0px; background-repeat: no-repeat; padding-top: 1px;"></div>
</div>
</body>
</html>
浏览器似乎在这一行找不到 o3djs/base.js
<script type="text/javascript" src="o3djs/base.js"></script>
并在这一行给我一个未捕获的参考错误
o3djs.require('o3djs.camera');
很明显,因为找不到o3djs/base.js...
我已经从 google 安装了 o3d 插件,他们说应该是 IT 我试过火狐,ie和chrome
谢谢
【问题讨论】:
-
你把那个 javascript 源代码(“base.js”)放在哪里了?您的网页是从哪里提供的?
-
我现在只是尝试在本地运行该页面。就是这样,o3d 的网站告诉我要做的就是安装插件,我很高兴。
标签: javascript o3d referenceerror