JS函数 获取年数 var d = new Date(); var years = d.getFullYear(); 输入窗口: var text = prompt("请输入你的数字:", "123"); //“123”为默认值