📄 jububianliang.htm
字号:
<html>
<title>局部变量</title>
<head>
<script type ="text/javascript" language="javascript">
var userName="global name";
function test()
{
document.write(userName);
document.write("<br>");
var userName="local name";
document.write(userName);
return true;
}
//test();
//document("<br>");
function write()
{
var astr="24" ;
var anum=24;
var x=astr+anum;
var y=anum+astr;
document.write(x);
document.write("<br>");
document.write(parseInt(y));
return true;
}
// write();
function read()
{
var a,b,c;
var e,d=1,f=1,g="string",h,i="string";
a=e||(d+2);
b=(d-f)||"str";
c=(f+3)||(g=2+"str");
h=(d-f)||(i=2+"str");
document.write(a);
document.write("<br>");
document.write(b);
document.write("<br>");
document.write(c):
document.write("<br>");
document.write(h);
document.write("<br>");
}
return true;
// read();
function load()
{
document.();
read();
write();
}
</script>
</head>
<body onload="load()">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -