這是問題,我不能無論如何。 我有以下簡單的腳本輸入onfocus問題
<input class="input" type="text" name="l_username" style="color: #ccc;"
value= " <?if ($_POST[l_username] != '')
echo $_POST[l_username];
else echo 'something';?>"
onfocus="if (this.value == 'something') {
this.value='';this.style.color='black';}" />
聚焦狀態並不在這裏工作,但是當我從值刪除PHP腳本,它的工作原理
<input class="input" type="text" name="l_username" style="color: #ccc;"
value= " something"
onfocus="if (this.value == 'something') {
this.value='';this.style.color='black';}" />
它工作正常。 你能告訴我爲什麼嗎? 感謝
@Mannaz是的,你是真的,謝謝;) – Simon 2010-04-07 20:47:15