表單應用文本框:textInput();密碼框:passWordInput();單選框:radio(),radioList();復選框:checkbox(),checkboxList();下拉框:dropDownList();隱藏域:hiddenInput();文本域:textarea(['rows'=>3]);文件上傳:fileInput();提交按鈕:submitButton();重置按鈕:resetButtun(); <?php$form = ActiveForm::begin(['action' => ['test/getpost'],'method'=>'post',]); ?> <? echo $form->field($model, 'username')->textInput(['maxlength' => 20]) ?><? echo $form->field($model, 'password')->passwordInput(['maxlength' => 20]) ?><? echo $form->field($model, 'sex')->radioList(['1'=>'男','0'=>'女']) ?><? echo $form->field($model, 'edu')->dropDownList(['1'=>'大學','2'=>'高中','3'=>'初中'], ['
新聞熱點
疑難解答