當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。