开发者

Is it possible - clear input field on focus with CakePHP (as opposed to just writing some js)

I realize this seems like an obvious JS type thing - but I'm new to CakePHP, and just wondering if there's some elegant soluti开发者_JS百科on to clearing a text input when clicking on it.... like maybe an attribute for the field's array 'clearOnFocus'=>'true' or something?


You could use the placeholder feature of HTML5:

$this->Form->input('example', array('placeholder' => 'Your placeholder text'));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜