document.body.clientWidth是什么意思? 20
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN"><HTML><HEAD><TITLE>NewDocumen...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function lockScreen(){
document.body.scroll = "no";
if(document.getElementById("ScreenOver")){
document.getElementById("ScreenOver").style.display="";
}else{
var objScreen = document.getElementById("ScreenOver");
if (!objScreen) {
var objScreen = document.createElement("div");
}
objScreen.innerHTML='<div style="position:absolute;top:200;left:200;background:yellow">姓名:<INPUT TYPE="text" NAME="">年龄:<INPUT TYPE="text" NAME=""></div>'
var oS = objScreen.style;
objScreen.id = "ScreenOver";
oS.display = "block";
oS.top = "0px";
oS.left = "0px";
oS.margin = "0px";
oS.padding = "0px";
oS.width = document.body.clientWidth;
oS.height = document.body.clientHeight+400;
oS.position = "absolute";
oS.zIndex = "3";
oS.background = "#000000";
oS.filter = "alpha(opacity=40)";
oS.opacity = 40 / 100;
oS.MozOpacity = 40 / 100;
document.body.appendChild(objScreen);
}
}
//-->
</SCRIPT>
</HEAD>
<BODY >
<INPUT TYPE="button" NAME="a" value="锁屏" onclick="lockScreen()">
</BODY>
</HTML>
这是在网上看到的一个代码,其中if(document.getElementById("ScreenOver")){
document.getElementById("ScreenOver").style.display="";
}else{
var objScreen = document.getElementById("ScreenOver");
这段代码看不懂什么意思,另外
document.body.clientWidth是什么意思?
求高手解答下. 展开
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function lockScreen(){
document.body.scroll = "no";
if(document.getElementById("ScreenOver")){
document.getElementById("ScreenOver").style.display="";
}else{
var objScreen = document.getElementById("ScreenOver");
if (!objScreen) {
var objScreen = document.createElement("div");
}
objScreen.innerHTML='<div style="position:absolute;top:200;left:200;background:yellow">姓名:<INPUT TYPE="text" NAME="">年龄:<INPUT TYPE="text" NAME=""></div>'
var oS = objScreen.style;
objScreen.id = "ScreenOver";
oS.display = "block";
oS.top = "0px";
oS.left = "0px";
oS.margin = "0px";
oS.padding = "0px";
oS.width = document.body.clientWidth;
oS.height = document.body.clientHeight+400;
oS.position = "absolute";
oS.zIndex = "3";
oS.background = "#000000";
oS.filter = "alpha(opacity=40)";
oS.opacity = 40 / 100;
oS.MozOpacity = 40 / 100;
document.body.appendChild(objScreen);
}
}
//-->
</SCRIPT>
</HEAD>
<BODY >
<INPUT TYPE="button" NAME="a" value="锁屏" onclick="lockScreen()">
</BODY>
</HTML>
这是在网上看到的一个代码,其中if(document.getElementById("ScreenOver")){
document.getElementById("ScreenOver").style.display="";
}else{
var objScreen = document.getElementById("ScreenOver");
这段代码看不懂什么意思,另外
document.body.clientWidth是什么意思?
求高手解答下. 展开
网易云信
2023-12-06 广告
2023-12-06 广告
UIkit是一套轻量级、模块化且易于使用的开源UI组件库,由YOOtheme团队开发。它提供了丰富的界面元素,包括按钮、表单、表格、对话框、滑块、下拉菜单、选项卡等等,适用于各种类型的网站和应用程序。UIkit还支持响应式设计,可以根据不同...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询