☀【JS组织】pageA_init, pageB_init

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
var Bear = function() {
return {
f1: function() {
console.log('f1')
},
f2: function() {
console.log('f2')
},
f3: function() {
console.log('f3')
},
pageA_init: function() {
var that = this
that.f1()
that.f3()
},
pageB_init: function() {
var that = this
that.f2()
}
}
}()
</script>
<script>
Bear.pageA_init()
</script>
</body>
</html>
上一篇:Git——git 上传时 遗漏文件解决办法


下一篇:解决JFinal多文件上传时只获取到第一个文件名