源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

js函数返回多个返回值的示例代码

  • 时间:2022-10-03 17:21 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:js函数返回多个返回值的示例代码
[u]复制代码[/u] 代码如下:
var w = getClientSize().width; var h = getClientSize().height - 97;
[u]复制代码[/u] 代码如下:
function getClientSize() { var a = h = 0; if (window.innerHeight) { a = window.innerWidth; h = window.innerHeight } else { if (document.documentElement && document.documentElement.clientHeight) { a = document.documentElement.clientWidth; h = document.documentElement.clientHeight } else { a = document.body.clientWidth; h = document.body.clientHeight } } return { width: a, height: h }; }
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部