【问题标题】:How to find Masterpage height and width using Javascript如何使用 Javascript 查找母版页的高度和宽度
【发布时间】:2011-03-19 15:02:18
【问题描述】:

如何使用 Javascript 找到 Masterpage offsetheightoffsetwidth

【问题讨论】:

    标签: javascript html asp.net dhtml


    【解决方案1】:

    MasterPage 高度和宽度不就是文档的高度和宽度吗?而通过offsetWidth和offsetHeight,你的意思是你想要宽度和高度吗?偏移量通常用于左侧和顶部。

    使用 jQuery 的 widthheight 方法:

    var width = $(document).width();
    var height = $(document).height();
    

    【讨论】:

    • 我有一个母版页,我正在加载 aspx 页面。在 aspx 页面中我有一个表
    • 所以我需要在运行时动态分配一个值
    猜你喜欢
    • 2019-10-12
    • 1970-01-01
    • 2021-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-30
    • 2017-06-09
    相关资源
    最近更新 更多