1
我試圖檢索服務器端控件的offsetHeight,但它給了我一個錯誤。下面的代碼片段 -無法檢索偏移量的ASP.NET服務器端控件
function Test() {
var imgFavorite = $("<%= imgFavorite.ClientID %>"); //imgFavorite is a server-side asp:Image control.
alert(imgFavorite); //[object Object]
alert(imgFavorite.offsetHeight()); //undefined.
}
代碼有什麼問題?
非常感謝你。我完全錯過了! – tempid