📄 common.js
字号:
function $(id, winHDL) {
if (typeof(winHDL) === "undefined") {
winHDL = window;
}
return winHDL.document.getElementById(id);
}
function getAddressLang() {
var addressLang = location.search.match(/lang=(\w+)/);
addressLang = addressLang ? addressLang[1] : "zh_cn";
return addressLang;
}
function getCurStep() {
var curStep = location.search.match(/step=(\w+)/);
curStep = curStep ? curStep[1] : "welcome";
return curStep;
}
function setInputCheckedStatus() {
var targetInput= $("js-" +getAddressLang());
if (!targetInput) {
return;
}
targetInput.setAttribute("checked", "checked");
var langOptions = document.getElementsByName("js-lang");
for (var i = 0; i < langOptions.length; i++) {
langOptions[i].onclick = function () {
var selectedLang = this.getAttribute("id").slice(3);
location.href = "./index.php?lang=" + selectedLang + "&step=" + getCurStep();
};
}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -