欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js函數(shù)返回多個返回值的示例代碼

 更新時間:2013年11月05日 17:46:07   作者:  
js函數(shù)一般都是返回一個值,在本例教程中將為大家介紹下如何返回多個返回值,喜歡的朋友可以了解下
復(fù)制代碼 代碼如下:

var w = getClientSize().width;
var h = getClientSize().height - 97;

復(fù)制代碼 代碼如下:

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
};
}

相關(guān)文章

最新評論