in cake we use

$this->html->script('jsfilenamewithdotjs');

to add an external js file to a view How'd we do that with lithium

有帮助吗?

解决方案

echo $this->html->script('jquery.js'); returns a <script /> tag. If the filename is prefixed with "/", the path will be relative to the base path of your application. Otherwise, the path will be relative to your JavaScript path, usually webroot/js.

For an external script $this->html->script('http://foo.com/bar.js');

Docs: http://li3.me/docs/lithium/template/helper/Html::script()

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top