Site Notice

hello, world

Difference between revisions of "中文变量名"

From Project-EPB Commons
([InPageEdit] 没有编辑摘要)
([InPageEdit] 没有编辑摘要)
 
Line 2: Line 2:
 
<button onclick="函数()">点击这里,执行函数</button> *字面意思
 
<button onclick="函数()">点击这里,执行函数</button> *字面意思
 
<script>
 
<script>
var 函数 = function() {
+
var 空值 = null,
 +
    未定义 = undefined,
 +
    真 = true,
 +
    假 = false;
 +
 
 +
function 函数() {
 
var 模态框 = ssi_modal,
 
var 模态框 = ssi_modal,
 
     常用变量 = mw.config.get(['wgSiteName','wgUserName']),
 
     常用变量 = mw.config.get(['wgSiteName','wgUserName']),
Line 8: Line 13:
 
     用户名 = 常用变量.wgUserName,
 
     用户名 = 常用变量.wgUserName,
 
     内容,
 
     内容,
    空值 = null,
+
     对话框 = 'dialog';
     对话框 = 'dialog',
 
    真 = true, 假 = false;
 
 
   if (用户名 === 空值) {
 
   if (用户名 === 空值) {
 
     内容 = '你尚未登录 ' + 网站名 +'!';
 
     内容 = '你尚未登录 ' + 网站名 +'!';
Line 25: Line 28:
 
</script>
 
</script>
 
</html>
 
</html>
<pre>var 函数 = function() {
+
<pre>
 +
var 空值 = null,
 +
    未定义 = undefined,
 +
    真 = true,
 +
    假 = false;
 +
 
 +
function 函数() {
 
var 模态框 = ssi_modal,
 
var 模态框 = ssi_modal,
 
     常用变量 = mw.config.get(['wgSiteName','wgUserName']),
 
     常用变量 = mw.config.get(['wgSiteName','wgUserName']),
Line 31: Line 40:
 
     用户名 = 常用变量.wgUserName,
 
     用户名 = 常用变量.wgUserName,
 
     内容,
 
     内容,
    空值 = null,
+
     对话框 = 'dialog';
     对话框 = 'dialog',
 
    真 = true, 假 = false;
 
 
   if (用户名 === 空值) {
 
   if (用户名 === 空值) {
 
     内容 = '你尚未登录 ' + 网站名 +'!';
 
     内容 = '你尚未登录 ' + 网站名 +'!';
Line 45: Line 52:
 
     sizeClass: 对话框
 
     sizeClass: 对话框
 
   });
 
   });
}</pre>
+
}
 +
</pre>

Latest revision as of 03:25, 24 January 2020

<html> <button onclick="函数()">点击这里,执行函数</button> *字面意思 <script> var 空值 = null,

   未定义 = undefined,
   真 = true,
   假 = false;

function 函数() { var 模态框 = ssi_modal,

   常用变量 = mw.config.get(['wgSiteName','wgUserName']),
   标题 = 网站名 = 常用变量.wgSiteName,
   用户名 = 常用变量.wgUserName,
   内容,
   对话框 = 'dialog';
 if (用户名 === 空值) {
   内容 = '你尚未登录 ' + 网站名 +'!';
 } else {
   内容 = '你的用户名是: ' + 用户名;
 }
 模态框.show({
   title: 标题,
   content: 内容,
   center: 真,
   sizeClass: 对话框
 });

} </script> </html>

var 空值 = null,
    未定义 = undefined,
    真 = true,
    假 = false;

function 函数() {
var 模态框 = ssi_modal,
    常用变量 = mw.config.get(['wgSiteName','wgUserName']),
    标题 = 网站名 = 常用变量.wgSiteName,
    用户名 = 常用变量.wgUserName,
    内容,
    对话框 = 'dialog';
  if (用户名 === 空值) {
    内容 = '你尚未登录 ' + 网站名 +'!';
  } else {
    内容 = '你的用户名是: ' + 用户名;
  }
  模态框.show({
    title: 标题,
    content: 内容,
    center: 真,
    sizeClass: 对话框
  });
}