【发布时间】:2014-05-26 09:45:08
【问题描述】:
我想在我的 zendframework 项目中添加 jquery 脚本,这是我的布局。 phtml头部分
<?php
$this->headMeta()->appendHttpEquiv(
'Content-Type', 'text/html;charset=utf-8');
$this->headTitle('ToDo APP')->setSeparator(' - ');
echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headLink()->appendStylesheet($this->baseUrl().'/css/style.css'); ?>
<?php print $this->headScript()->appendFile($this->baseUrl().'/js/bootstrap.js')
->prependFile('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'); ?>
</head>
我需要http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js 才能使用我的引导程序。 js文件,但它不工作请帮助如何正确地做到这一点 我的 css 和 js 文件夹也放在 public 文件夹中。
【问题讨论】:
-
你为什么不直接把它包含在
<head>中,就像<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>一样 -
我刚才试过了,先生,但还是不行
-
你试过 ZendX_JQuery View Helpers 吗? framework.zend.com/manual/1.12/en/zendx.jquery.view.html
标签: javascript php jquery ajax zend-framework