2015-06-12 11:49:14 3060次浏览 3条回答 0 悬赏 30 金钱
<fieldset>
<form class="subscriptionForm" method="post">
     <input id="subscriptionForm" class="inputForm" type="text" value="Enter Your Email Address" onFocus="if (this.value=='Enter Your Email Address') this.value=''" onBlur="if (this.value==''){this.value='Enter Your Email Address'}" />
     <input type="submit" id="submitButton" class="transition" value="Send">
</form>					
</fieldset>

最佳答案

  • xiaomengzi 发布于 2015-06-12 16:05 举报
    <?php $form = ActiveForm::begin([
                    'method'=>'post',
                    'options' => ['class' => 'subscriptionForm'],
                    
                ]); ?>
    <?= $form->field($model, 'search_code')->textInput(['value' =>'Enter Your Email Address','onFocus'=>"if (this.value=='Enter Your Email Address') this.value=''",'onBlur'=>"if (this.value==''){this.value='Enter Your Email Address'}", 'id' => 'subscriptionForm','class'=>'inputForm']) ?>
    <?= Html::submitButton('Send', ['class' => 'transition''id'=>"submitButton"]) ?>
    <?php ActiveForm::end(); ?>
    
    4 条回复
    回复于 2015-06-12 16:07 回复

    还是不行,一样

    回复于 2015-06-12 16:09 回复

    审查元素 看看差哪个class 或id了 就知道了

    回复于 2015-06-12 16:12 回复

    远程看看可否?

    回复于 2015-06-12 16:14 回复

    还是自己来吧

    觉得很赞
  • 回答于 2015-06-12 15:29 举报
    <?php $form = ActiveForm::begin([
                    'id' => 'subscriptionForm',
                    'method'=>'post',
                    'options' => ['class' => 'inputForm'],
                    
                ]); ?>
    <?= $form->field($model, 'search_code')->textInput(['value' =>'Enter Your Email Address','onFocus'=>"if (this.value=='Enter Your Email Address') this.value=''",'onBlur'=>"if (this.value==''){this.value='Enter Your Email Address'}") ?>
    <?= Html::submitButton('Send', ['class' => 'transition''id'=>"submitButton"]) ?>
    <?php ActiveForm::end(); ?>
    
    1 条回复
    回复于 2015-06-12 15:57 回复

    还是不行,样式变样了

  • 回答于 2015-06-12 20:52 举报

    最好是上传一张图片为最佳

    2 条回复
    回复于 2015-06-12 22:42 回复

    霸气的回答!

    回复于 2015-06-14 10:53 回复

    哈哈哈

您需要登录后才可以回答。登录 | 立即注册
jhomephper
副总裁

jhomephper 帝都

注册时间:2015-05-05
最后登录:2021-04-20
在线时长:78小时1分
  • 粉丝32
  • 金钱5330
  • 威望10
  • 积分6210

热门问题