【发布时间】:2023-03-18 06:48:01
【问题描述】:
我想在我的索引页加载后加载一个模板。我的索引页面包含:
<script src="site/introduction.html" type="text/html"></script>
<script src="js/lib/jquery-1.6.1.js" type="text/javascript"></script>
<script src="js/lib/ICanHaz.js" type="text/javascript"></script>
<script src="js/app/main2.js" type="text/javascript"></script>
并且 main2.js 包含:
$(function() {
var introduction_html = ich.introduction();
$('#pm').html(introduction_html.filter('#introduction'));
});
没有找到介绍模板!即使我在调用 ich.grabTemplates() 之前使用它,它也不起作用。
我该如何解决这个问题?
introduction.html 包含:
<html>
<head>
<style type="text/css">
P.submit {text-align: left}
</style>
</head>
<body>
<div id="introduction">
<p>The tool can now guide you, step by step, through this procedure, beginning when you click on the "start" button below.</p>
<form action="">
<p class="submit"><input type="submit" value="Start" /></p>
</form>
</div>
</body>
</html>
【问题讨论】:
-
@ThomasClayson,你的意思是 我可以危害控制台输出?
-
我收到错误 Object #
has no method 'introduction' -
能把introduction.html的内容贴出来吗?
-
在调用ich.introduction之后会调用抓取模板的ajax回调... 怎么同步这些东西?
-
应该这样定义模板: ?
标签: jquery icanhaz.js