亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么下面代碼在本課程里能看到效果,在vscode里選擇瀏覽器打開看不到?

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>屏幕分辨率的高和寬</title>

</head>

<body>

<script type="text/javascript">

var s ="網頁可見區域寬:"+ document.body.clientWidth;?

? ? ? s+="\r\n網頁可見區域高:"+ document.body.clientHeight;?

? ? ? ? s += "\r\n網頁正文全文寬:"+ document.body.scrollWidth;?

? ? ? ?s += "\r\n網頁正文全文高:"+ document.body.scrollHeight;?

? ? ? ? s += "\r\n網頁正文部分上:"+ window.screenTop;?

? ? ? ?s += "\r\n網頁正文部分左:"+ window.screenLeft;?

? ? ? ?s += "\r\n屏幕分辨率的高:"+ window.screen.height;?

? ? ? ?s += "\r\n屏幕分辨率的寬:"+ window.screen.width;?

? ? ? ? s +="\r\n屏幕可用工作區高度:"+ window.screen.availHeight;?

? ? ? ? s +="\r\n屏幕可用工作區寬度:"+ window.screen.availWidth;?

alert(s);?

document.write(s) ;

</script>

</body>

</html>


正在回答

1 回答

應該是瀏覽器不兼容

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

為什么下面代碼在本課程里能看到效果,在vscode里選擇瀏覽器打開看不到?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號