返回 JavaScr...... 登陆

JavaScript提升篇作业

Sunday灬燃, 2018-12-10 11:41:55 148
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JavaScript</title>
<style>
#ShiJianBox{
width: 300px;
height: 300px;
background: #ccc;
border-radius: 10px;
}

</style>
</head>
<body>
<div id="ShiJianBox">
</div>
<span>当前时间:</span>
<script type="text/javascript">
ShiJianBox.onclick=function ShiJianBoxChange(x) {
ShiJian = document.getElementById('ShiJianBox')
ShiJian.style.borderRadius="150px"
}
var MyDate = new Date();
document.write(MyDate.getFullYear()+"年");
document.write((MyDate.getMonth()+1)+"月");
document.write(MyDate.getDate()+"日");
document.write("周"+MyDate.getFullYear());
document.write(MyDate.getHours()+"时");
document.write(MyDate.getMinutes()+"分");
document.write(MyDate.getSeconds()+"秒");
</script>


</body>
</html>

运行前QQ截图20181210114014.png

运行后QQ截图20181210114025.png

最新手记推荐

• 用composer安装thinkphp框架的步骤 • 省市区接口说明 • 用thinkphp,后台新增栏目 • 管理员添加编辑删除 • 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消 回复 发送
  • PHP中文网