更新
This commit is contained in:
35
teaching/lhj/kejian/js/hanshu.html
Normal file
35
teaching/lhj/kejian/js/hanshu.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<script>
|
||||
// 函数声明
|
||||
function add(x,y){
|
||||
// x,y => 形参
|
||||
console.log(x+y)
|
||||
return //return 语句就是函数的结束语句 他后面的语句一定是不执行的
|
||||
console.log("五一过完了")
|
||||
}
|
||||
|
||||
// 函数表达式
|
||||
var add1=function(x,y){
|
||||
console.log(x+y)
|
||||
}
|
||||
|
||||
var result=add1(1,2);
|
||||
// 1,2 实参
|
||||
console.log(result);
|
||||
|
||||
(function(){
|
||||
document.write("lijizhixing")
|
||||
})();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user