我的aspx頁面中有一個輸入元素。運行時不顯示Javascript調用(asp.net)
<input id="txtAllocAmt" type="text" class="txtAllocAmt" tabindex="2" size="10" name="Text1"
runat="server" disabled="disabled" onfocus="javascript:SetOldAllocAmt(this.id);"
onblur="ValidateAllocAmt(this.id);" />
的問題是,由於某種原因,兩個「聚焦狀態」和「的onblur」 JavaScript調用不顯示時運行代碼,如下圖所示。
<input onblur="" onfocus="" id="lvLienAllocations_ctrl0_ctl00_txtAllocAmt" class="txtAllocAmt" tabIndex="2" name="lvLienAllocations$ctrl0$ctl00$txtAllocAmt" size="10" type="text">
出於某種原因「的onblur」和「聚焦狀態」設置爲空字符串。
什麼是阻止asp.net代碼生成器生成這些javascript調用?
頂部是如何出現在ASPX標記和底部是如何呈現在瀏覽器? –
你試過把'onfocus =「SetOldAllocAmt(this.id)」'? –
@Yuriy Galanter:是的。 – Sung