开发者

get current width of html form using javascript

I want to get the current width of an html form using javascript. I'm writing this in asp.net

Form definition: <form id="form1" runat="server">

What I an trying: document.getElementById('form1').style.width

Keep producing a 开发者_StackOverflow中文版runtime error... Any ideas?

Thanks!


Have you tried this: document.body.clientWidth ?


Try this

document.getElementById('form1').offsetWidth
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜