当前位置: 首页>>代码示例>>PHP>>正文


PHP AppAsset::addScript方法代码示例

本文整理汇总了PHP中frontend\assets\AppAsset::addScript方法的典型用法代码示例。如果您正苦于以下问题:PHP AppAsset::addScript方法的具体用法?PHP AppAsset::addScript怎么用?PHP AppAsset::addScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在frontend\assets\AppAsset的用法示例。


在下文中一共展示了AppAsset::addScript方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

use frontend\assets\AppAsset;
AppAsset::register($this);
AppAsset::addCss($this, '@web/css/orc.css');
AppAsset::addScript($this, '@web/js/orc.js');
echo $this->render('/layouts/tabbar', ['cur' => 'orc']);
?>
<div class="swiper-container banner_max" id="banner_max">
    <div class="swiper-wrapper">
        <!-- banner1 -->
        <div class="swiper-slide">
            <div class="banner1_wp">
                <img src="/images/com/arr.png" class="img_arr pt-page-moveIconUp">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <div class="layout">
                            <div class="tit_txt ani" swiper-animate-effect="fadeInLeft"  swiper-animate-duration="1s" swiper-animate-delay="0"></div>
                            <ul>
                                <li class="ani p1" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0"></li>
                                <li class="ani p2" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.1s"></li>
                                <li class="ani p3" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.2s"></li>
                                <li class="ani p4" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s"></li>
                                <li class="ani p5" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.4s"></li>
                                <li class="ani p6" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.5s"></li>
                                <li class="ani p7" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.6s"></li>
                                <li class="ani p8" swiper-animate-effect="fadeInUp" swiper-animate-duration="0.5s" swiper-animate-delay="0.7s"></li>
                            </ul>
                            <div class="banner1_img"></div>
                        </div>
                    </div>
开发者ID:jaybril,项目名称:www.juice.com,代码行数:31,代码来源:orchard.php

示例2: foreach

<?php

use common\widgets\FVariable;
use frontend\assets\AppAsset;
AppAsset::register($this);
AppAsset::addCss($this, '@web/css/index.css');
AppAsset::addScript($this, '@web/js/index.js');
echo $this->render('/layouts/tabbar', ['cur' => 'index']);
?>
<div class="swiper-container banner">
    <div class="swiper-wrapper">
        <?php 
if ($bannerList) {
    foreach ($bannerList as $k => $v) {
        $address = FVariable::$domainUrl . $v->address;
        $wapUrl = FVariable::$domainUrl . $v->wapUrl;
        echo '<div class="swiper-slide swiper-no-swiping">';
        echo ' <div class="img" style="background: url(' . $address . ') no-repeat center top;"></div>';
        echo '<div class="wp">';
        echo '<div class="txt1 ani" swiper-animate-effect="fadeInLeft" swiper-animate-duration="1s" swiper-animate-delay="0.2s">';
        echo '<img src="' . $wapUrl . '">';
        echo '</div>';
        echo '</div>';
        echo '</div>';
        echo '';
        echo '';
    }
}
?>
    </div>
    <div class="swiper-pagination banner-swiper-pagination"></div>
开发者ID:jaybril,项目名称:www.juice.com,代码行数:31,代码来源:index.php

示例3:

<?php

use frontend\assets\AppAsset;
use common\widgets\GlobalArray;
AppAsset::register($this);
AppAsset::addScript($this, "/js/jquery.imagezoom.min.js");
$this->beginBlock('test');
?>
$(document).ready(function(){
$(".bigimg-jqzoom").imagezoom();
});
<?php 
$this->endBlock();
$this->registerJs($this->blocks['test'], \yii\web\View::POS_END);
?>
    <div class="teadetails" id="teadetails">

	<div class="section">

			<div class="teaDet container">
<!--				<p class="teaDet-share">喜大奔普:<a href=""><img src="/img/fx2.png" /></a><a href=""><img src="/img/fx1.png" /></a><a href=""><img src="/img/u109.png" /></a><a href=""><img src="/img/fx3.png" /></a><a href=""><img src="/img/fx5.png" /></a></p>-->
				
				<div class="teaDet-con cl">
					<div class="teaDet-con-left">
						<div class="bigimg"><img src="/img/index_11.png" class="img-responsive bigimg-jqzoom" rel="/img/index_11.png" /></div>
						<div class="smallimg cl">
						<div class="smallimg-div">
							<ul class="smallimg-ul">
								<?php 
$active = "active";
foreach ($MaterialList as $k => $v) {
开发者ID:jaybril,项目名称:www.mimgpotea.com,代码行数:31,代码来源:teadetails.php

示例4:

    </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="/js/editor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="/js/editor/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
  
        var ue = UE.getEditor('container', {
            autoHeight: false});
        ue.ready(function() {
            //设置编辑器的内容
            ue.setContent('hello');
            //获取html内容,返回: <p>hello</p>
            var html = ue.getContent();
            //获取纯文本内容,返回: hello
           // var txt = ue.getContentTxt();
            
        });       
    </script>
    <button class="btn btn-primary" id="save">保存</button>
 <script>
<?php 
AppAsset::addScript($this, 'js/run.js');
?>
   
//只在该视图中使用非全局的jui    
</script>


开发者ID:pretty123,项目名称:test,代码行数:28,代码来源:index.php

示例5:

<?php

use frontend\assets\AppAsset;
AppAsset::register($this);
AppAsset::addCss($this, '@web/css/join.css');
AppAsset::addScript($this, '@web/js/join.js');
echo $this->render('/layouts/tabbar', ['cur' => 'about']);
?>
<!-- banner1 -->
<div class="swiper-container meun_banner banner1_wp">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
            <div class="layout1190">
                <div class="h1">- 加盟条件 -</div>
                <ul>
                    <li class="ani p1" swiper-animate-effect="flipInY" swiper-animate-duration="0.5s" swiper-animate-delay="0"></li>
                    <li class="ani p2" swiper-animate-effect="flipInY" swiper-animate-duration="0.5s" swiper-animate-delay="0.2s"></li>
                    <li class="ani p3" swiper-animate-effect="flipInY" swiper-animate-duration="0.5s" swiper-animate-delay="0.4s"></li>
                    <li class="ani p4" swiper-animate-effect="flipInY" swiper-animate-duration="0.5s" swiper-animate-delay="0.6s"></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- banner2 -->
<div class="swiper-container meun_banner banner2_wp">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
            <div class="layout1190">
                <div class="h1">- 加盟流程 -</div>
                <div class="ani txt" swiper-animate-effect="bounceIn" swiper-animate-duration="1s" swiper-animate-delay="0.2s"></div>
开发者ID:jaybril,项目名称:www.juice.com,代码行数:31,代码来源:join.php

示例6:

<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use frontend\assets\AppAsset;
AppAsset::register($this);
AppAsset::addScript($this, '/js/area.js');
?>

<div class="vipcon">
    <div class="vipcon-left">
        <?php 
$index_vip = "vcenter";
echo $this->render(\common\widgets\FVariable::$layoutVipmenu_view, ['index_vip' => $index_vip]);
?>
    </div>
    <div class="vipcon-right">
           <div class="addaddress">
               <div class="addaddree-head">
                   <span>添加配送地址</span>
                   <a href="<?php 
echo \common\widgets\FVariable::$userVipcenter_url;
?>
" class="addaddree-head-a">返回上一级</a>
               </div>
               <div class="addaddress-con">
                   <?php 
$form = ActiveForm::begin(['id' => 'AddAddressForm', 'options' => ['name' => 'AddAddressForm']]);
?>
                       <?php 
开发者ID:jaybril,项目名称:www.mimgpotea.com,代码行数:31,代码来源:addaddress.php

示例7:

<?php

use frontend\assets\AppAsset;
use yii\widgets\LinkPager;
AppAsset::register($this);
AppAsset::addCss($this, '@web/css/recruit.css');
AppAsset::addScript($this, '@web/js/recruit.js');
echo $this->render('/layouts/tabbar', ['cur' => '']);
?>
<div class="top_banner"></div>

<div class="content_pg layout1190">
    <div class="tit"><img src="/images/recruit/s.jpg"></div>
    <div class="top">
        <p class="ft24">有一个机会,连接更广阔的世界,走出属于自己的成功之路</p>
        <p class="ft14">我们的雇员是橙汁先生2年来走向成功的基石,在这里,所有的目标和成就,都要依靠雇员的努力实现,因此我们将珍贵的雇员称作“伙伴”。<br/>
            我们永远珍视和尊重伙伴们为橙汁先生带来的一切,也竭尽可能提供机会让你在这里提升自我,找寻职业方向,并且最终实现个人目标。<br/>
            在橙汁先生,你将会发现一条和伙伴们一起走向卓越的路,也会感受到一直以来我们所坚持的对伙伴们和顾客们的尊重,更可以与我们一起践行我们所肩负的企业社会责任。<br/>
            适应性强、充满激情、散发着正能量、富有创造力且重视团队合作是我们一直以来所需要的重要品质,<br/>
            如果你具有这些品质,为什么不把它们带来橙汁先生呢?你的技能和创意正是这个快速发展的团队所需要的,</p>
        <p class="ft16 cl_c">来吧,加入我们,让我们共同迈向一个更美好的未来!<br/>
            我们坚信每个人都有被平等对待的权利,因此每个符合要求的申请者都在我们的考虑范围内!</p>
    </div>
    <div class="t">开放职位</div>
    <div class="box_wp">
        <?php 
foreach ($countries as $k => $v) {
    echo '<div class="box">';
    echo '<h3>' . $v->department . '</h3>';
    echo ' <p>' . $v->employName . '<span class="add">' . $v->address . '</span></p>';
    echo ' <a class="show" data-id="' . $v->id . '" href="javascript:void(0)"></a>';
开发者ID:jaybril,项目名称:www.juice.com,代码行数:31,代码来源:index.php

示例8:

      <h3>慕课网</h3>
      <span>慕课网,只学有用的</span>
       <img src="imgs/pic1.jpg">
       <img src="imgs/pic2.jpg">
       <img src="imgs/pic3.jpg">
       <img src="imgs/pic4.jpg">
   </div>   
</div>
<input type="date">时间
<a target=blank href=tencent://message/?uin=203674576&Site=pretty&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:203674576:6 alt="显示的字符"></a>
<img  style="CURSOR: pointer" onclick="javascript:window.open('http://b.qq.com/webc.htm?new=0&sid=820168613&o=qfy.link&q=7', '_blank', 'height=502, width=644,toolbar=no,scrollbars=no,menubar=no,status=no');"  border="0" SRC=http://wpa.qq.com/pa?p=1:820168613:1 alt="廊桥遗梦">
 <script>
<?php 
AppAsset::addScript($this, 'js/velocity.min.js');
AppAsset::addScript($this, 'js/velocity.ui.min.js');
AppAsset::addScript($this, 'js/photo.js');
?>
   
// public $js = [
//               'js/velocity.min.js',
//               'js/velocity.ui.min.js',
//               'js/photo.js',
//               ];
//只在该视图中使用非全局的jui    
</script>
<script type="text/javascript">
(function(){
var p = {
url:location.href, /*获取URL,可加上来自分享到QQ标识,方便统计*/
desc:'pretty', /*分享理由(风格应模拟用户对话),支持多分享语随机展现(使用|分隔)*/
title:'pretty', /*分享标题(可选)*/
开发者ID:pretty123,项目名称:test,代码行数:31,代码来源:photo.php

示例9:

<?php

use frontend\assets\AppAsset;
AppAsset::register($this);
AppAsset::addScript($this, '@web/js/jquery.fullPage.min.js');
AppAsset::addScript($this, '@web/js/pageContain.js');
?>
    <div class="pageContain" id="pageContain">
	<div class="section container">
		
			<p class="page-txt">景阳青茶园地处鲁东南风景秀丽的磴山脚下,茶园北依世界五大太阳崇拜起源地日照天台山,西邻黄海九寨沟,原生态环境保护极好,公司下设栗香茶叶专业合作社、茶厂、茶业研究所、网络营销中心,是山东省较早导入CIS战略的现代化茶叶生产、加工、销售和茶文化传播企业,是山东省茶叶生产加工技术研究推广中心和山东省茶叶工程技术研究中心实验点,现有高级农艺师2名</p>
			<p class="page-img"><img src="/img/2.jpg" class="img-responsive" /></p>
		
	</div>

	<div class="section container">
		
			<p class="page-txt">景阳青茶园地处鲁东南风景秀丽的磴山脚下,茶园北依世界五大太阳崇拜起源地日照天台山,西邻黄海九寨沟,原生态环境保护极好,公司下设栗香茶叶专业合作社、茶厂、茶业研究所、网络营销中心,是山东省较早导入CIS战略的现代化茶叶生产、加工、销售和茶文化传播企业,是山东省茶叶生产加工技术研究推广中心和山东省茶叶工程技术研究中心实验点,现有高级农艺师2名</p>
			<p class="page-img"><img src="/img/1.jpg" class="img-responsive" /></p>
		
	</div>

	<div class="section container">
		
			<p class="page-txt">景阳青茶园地处鲁东南风景秀丽的磴山脚下,茶园北依世界五大太阳崇拜起源地日照天台山,西邻黄海九寨沟,原生态环境保护极好,公司下设栗香茶叶专业合作社、茶厂、茶业研究所、网络营销中心,是山东省较早导入CIS战略的现代化茶叶生产、加工、销售和茶文化传播企业,是山东省茶叶生产加工技术研究推广中心和山东省茶叶工程技术研究中心实验点,现有高级农艺师2名</p>
			<p class="page-img"><img src="/img/3.jpg" class="img-responsive" /></p>
	
	</div>

	<div class="section container">
		
开发者ID:jaybril,项目名称:www.mimgpotea.com,代码行数:30,代码来源:technology.php

示例10:

<?php

use yii\helpers\Html;
use yii\helpers\Url;
use frontend\assets\AppAsset;
$this->title = '【骑行中国-二手自行车专卖网】';
$this->params['bodyClass'] = 'home';
$bundle = AppAsset::register($this);
AppAsset::addCss($this, $bundle->baseUrl . '/vender/owlcarousel/assets/owl.carousel.css');
AppAsset::addScript($this, $bundle->baseUrl . '/vender/owlcarousel/owl.carousel.min.js');
?>

<section class="section-banner">
    <h2 class="slogan"><img src="<?php 
echo $bundle->baseUrl;
?>
/image/banner-text1.png" /></h2>
    <div class="search-box" >
        <input type="text" class="search-input" placeholder="请输入你想要的品牌,车型" />
        <button type="button" class="search-btn" >搜索</button>
    </div>
</section><!-- /.section-banner -->

<section class="section-portfolio">
    <div class="section-title">
        <h2>哪一款单车才是你的最爱?</h2>
        <span></span>
    </div>
    <?php 
echo \widgets\PortfolioWidget::widget(['items' => [['link' => '', 'caption' => '通勤自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_common.jpg'], ['link' => '', 'caption' => '山地自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_mountain_1.jpg'], ['link' => '', 'caption' => '公路自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_road_1.jpg'], ['link' => '', 'caption' => '折叠自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_folding.jpg'], ['link' => '', 'caption' => '女式自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_girl.jpg'], ['link' => '', 'caption' => '儿童自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_children.jpg'], ['link' => '', 'caption' => '电动自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_electric.jpg'], ['link' => '', 'caption' => '死飞自行车', 'image' => $bundle->baseUrl . '/image/portfolio/bike_fix_gear.jpg']]]);
?>
开发者ID:xitengfei,项目名称:cycling,代码行数:31,代码来源:index.php

示例11:

<?php

use frontend\assets\AppAsset;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use frontend\models\Area;
use common\widgets\Tool;
use common\widgets\FVariable;
AppAsset::register($this);
AppAsset::addScript($this, '/datepicker/WdatePicker.js');
AppAsset::addCss($this, '/datepicker/skin/WdatePicker.css');
?>
	
	<div class="vipcon">
		<div class="vipcon-left">
			<?php 
$index_vip = "vcenter";
echo $this->render(\common\widgets\FVariable::$layoutVipmenu_view, ['index_vip' => $index_vip]);
?>
		</div>
		<div class="vipcon-right">
			<div class="datum">
				<div class="datum-head">
					<div class="datum-head-left">
						<p><span>昵称:</span><?php 
echo Tool::echoEncodeString($model->nickName);
?>
</p>
						<p><span>手机:</span><?php 
echo Tool::echoEncodeString($model->mobile);
?>
开发者ID:jaybril,项目名称:www.mimgpotea.com,代码行数:31,代码来源:vipcenter.php


注:本文中的frontend\assets\AppAsset::addScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。