问题描述
|
我正在尝试使用embed标签将简单的Quartz Composition嵌入到网页中。根据Apple的文档和API参考,这应该是一个非常简单的任务,但是在JavaScript中选择嵌入式对象不会公开API。
这是我的页面:
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />
<title>Quartz Test</title>
<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js\"></script>
<script type=\"text/javascript\" src=\"script.js\"></script>
</head>
<body>
<div id=\"main\">
<h1>Quartz Test</h1>
<hr/>
<div id=\"content\">
<embed type=\"application/x-quartzcomposer\"
src=\"lineTest.qtz\"
id=\"myComp\"
width=\"300px\"
height=\"150px\"
opaque=\"false\"/>
</div>
</div>
</body>
</html>
这是我的js:
var composition;
$(document).ready(function() {
composition = $(\'#myComposiiton\');
});
通过这种简单的设置,我应该能够编写如下内容:
composition.loaded() //should be true
要么
composition.inputKeys() //should return Array
相反,我得到的只是调试器中的错误,如TypeError:表达式\'composition.loaded \'[undefined]的结果不是函数。
是否有人通过此方法或对我如何调试它有建议?
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)