我想設置字段的內部html值,並且工作正常,但是當我嘗試檢索它時失敗。我如何獲得與jQuery的輸入字段的值
我的代碼:
var butId = buttonPressed.getAttribute('id');
$('#will'+butId).remove();
$('#hidDelete').html(butId); //THIS WORKS FINE
var temp = $('#hidDelete').html(); //THIS DOESNT
alert (temp); //THIS PRINTS NOTHING
我的輸入字段:
<input id="hidDelete" type="hidden" name="hidDelete"/>
有人能看到什麼錯呢?
你確定(自閉)''標籤有內部HTML嗎?對我來說它沒有意義。 – Widor 2012-08-09 13:44:38