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