console
var data=Date()
function disp_prompt()
{
for(var i=1;i<3;i++){
var msg=prompt("请输入学号 姓名 三个成绩");
var msgArray=msg.split("");
document.write(msgArray+"</br>");
}
}
function getNowFormatDate() {
var date = new Date();
var seperator1 = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = year + seperator1 + month + seperator1 + strDate+" "+hours+ seperator1 + minutes + seperator1 + seconds;
console.log(currentdate)
console.log(year+"."+month+"."+strDate)
return currentdate;
}
var a2=getNowFormatDate();
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>定义组件、注册全局组件、使用组件</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js">
</script>
</head>
<body>
<div id="app">
<z1 :title="msg">
</z1>{{msg}}</div>
<script type="text/javascript">const instroduce = {
template: "<h2>{{title}}</h2>",
props: ["title"]
};
Vue.component("z1", instroduce);
var app = new Vue({
el: "#app",
data: {
msg: "你好"
}
})</script>
</body>
</html>