Onblur/onfocus不在里面工作php
我想添加onfocus/onblur事件到一个窗体,但不知何故我没有得到它的工作。我认为这与逃避报价有关,但我尝试了几种方法,但都没有成功。我的代码是这样的:在你的onblur串Onblur/onfocus不在里面工作php
echo '<input type="password" id="'.$field->name.'" name="'.$field->name.'" size="30" class="inputbox" placeholder="'.$field->title.'" onfocus="this.placeholder = ''" onblur="this.placeholder = '.$field->title.'"
/>'."\n";
break;
回答:
你缺少报价:
<?php echo '<input type="password" id="' . $field->name . '" name="' . $field->name . '" size="30" class="inputbox" placeholder="' . $field->title . '" onfocus="this.placeholder = ''" onblur="this.placeholder = \'' . $field->title . '\'" />'."\n";
以上是 Onblur/onfocus不在里面工作php 的全部内容, 来源链接: utcz.com/qa/259148.html