js测试
2024-08-25 13:06:20
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body> </body>
<script>
/*function outer(){
var a = 1;
function inner(){
a++;
alert(a);
}
return inner();
}
outer();
outer();*/ /*var name = 123;
var obj = {
name:456,
getName:function(){
return this.name;
// return function(){
// return this.name;
// }
}
};
alert(obj.getName());*/ /*var a = 1;
function b(){
a = 2;
document.write(a);
document.write("<br/>");
function a(){};
}
// b();
// document.write(a);
var bar = b;
alert(bar());*/
var a = 1; function a(){
document.write(a);
} document.write(a);
document.write("<br/>");
a();
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
<script>
/*function outer(){
var a = 1;
function inner(){
a++;
alert(a);
}
return inner();
}
outer();
outer();*/
/*var name = 123;
var obj = {
name:456,
getName:function(){
return this.name;
// return function(){
// return this.name;
// }
}
};
alert(obj.getName());*/
/*var a = 1;
function b(){
a = 2;
document.write(a);
document.write("<br/>");
function a(){};
}
// b();
// document.write(a);
var bar = b;
alert(bar());*/
var a = 1;
function a(){
document.write(a);
}
document.write(a);
document.write("<br/>");
a();
</script>
</html>
最新文章
- 三种POST和GET的提交方式
- tableview左滑按钮 tableviewcell自定义左滑按钮
- Objective-C 链式语法的实现
- DataTable.Compute()用法
- org.springframework.web.context.ContextLoaderListen 报错解决办法
- python用httplib模块发送get和post请求
- [Unity菜鸟] FBX模型动画提取
- 文件图标css样式
- css3购物网站商品文字提示实例
- 【android】两个按钮的宽度各占屏幕的一半
- curl向web服务器发送json数据
- [Windows编程] #pragma once 和#ifndef ... #define ... #endif 比较
- Codeforces 510B Fox And Two Dots 【DFS】
- JavaScript事件的几个细节
- Redis基础学习(三)&mdash;Key操作
- 微信小程序之HTTPS请求
- 每周分享五个 PyCharm 使用技巧(一)
- c++ 右值引用,move关键字
- 关于VS2017 添加 EF的MVC控制器报错的解决方法
- JSP 动作