本文整理汇总了PHP中JS::load方法的典型用法代码示例。如果您正苦于以下问题:PHP JS::load方法的具体用法?PHP JS::load怎么用?PHP JS::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JS
的用法示例。
在下文中一共展示了JS::load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
* from before.
*
* @package core
* @subpackage js
*
* @author ebollens
* @copyright Copyright (c) 2010-11 UC Regents
* @license http://mwf.ucla.edu/license
* @version 20111104
*
* @uses JS
*/
require_once dirname(__FILE__) . '/lib/js.class.php';
?>
<html><head></head><body><script type="text/javascript"><?php
/**
* Core Javascript libraries always included.
*/
$core_filenames = array('vars.php', 'base.js', 'modernizr.js', 'capability.js', 'browser.js', 'useragent.js', 'screen.js', 'classification.js', 'util.js', 'override.js', 'server.js');
/**
* Include each core Javascript library.
*/
foreach ($core_filenames as $filename) {
JS::load('core/' . $filename);
}
?>
window.location = '<?php
echo $_GET['return'];
?>
';</script></body></html>
示例2: isset
* Moves the window below the URL bar and fixes Safari viewport on orientation change.
*/
if (User_Agent::get_os() == 'iphone_os') {
JS::load('iphone/safariurlbar.js');
JS::load('iphone/orientation.js');
}
/**
* Include preview_util as part of js.php and import the desktop preview.
*
* @uses /assets/js/desktop/preview_util.php
* @uses /assets/js/desktop/preview.js [import]
*/
if (Classification::is_preview()) {
JS::load_from_key('jquery');
JS::load('desktop/preview_util.php');
JS::load('desktop/preview_menu.js');
}
/**
* Load all standard (and touch_lib for compat) libraries specified in the URI.
*/
if (Classification::is_standard() && (isset($_GET['standard_libs']) || isset($_GET['touch_libs']))) {
$loadarr = isset($_GET['standard_libs']) ? explode(' ', $_GET['standard_libs']) : array();
if (isset($_GET['touch_libs'])) {
$loadarr = array_merge(explode(' ', $_GET['touch_libs']), $loadarr);
}
foreach ($loadarr as $load) {
JS::load_from_key($load);
}
}
/**
* Load all full (and webkit_lib for compat) libraries specified in the URI.
示例3: load_js
function load_js()
{
JS::load();
}