用Javascript编与如下所示页面,页面内有两个按知,单击“改变页面设置”按钮时,页面字体设置为绿色,背景设置为黑色,页面标题设置为“迎光临”,同时打开一个新窗口,显示当前年月日。单击“退出”按钮时,页面关闭。
题目代码:
<html>
<head>
<script language="javascript">
function changeset()
/********FOUND*********/
{window.document.___(1)____="#000000";
/********FOUND*********/
window.document.____(2)___="#00ff00";
/********FOUND*********/
window.document.____(3)___="欢迎光临";
/********FOUND*********/
var win=window.___(4)____();
/********FOUND*********/
var d=new ___(5)____();
var mon=d.getMonth()+1;
/********FOUND*********/
win.document.write("当前的日期是:"+d.getFullYear()+"-"+___(6)____+"-"+d.____(7)___());
}
</script>
</head>
<body>
<h1>更改页面颜色</h1>
<p align="left">
<!-- ********FOUND********* -->
<input type="button" value="改变页面设置" onClick="javascript:___(8)____()">
<!-- ********FOUND********* -->
<input type="button" value="退出" onClick="javascript:___(9)____()">
</p>
</body>
</html>
<html>
<head>
<script language="javascript">
function changeset()
/********FOUND*********/
{window.document.body.style.color="#000000";
/********FOUND*********/
window.document.body.style.backgroundColor="#00ff00";
/********FOUND*********/
window.document.title="欢迎光临";
/********FOUND*********/
var win=window.open();
/********FOUND*********/
var d=new Date();
var mon=d.getMonth()+ 1;
/********FOUND*********/
win.document.write("当前的日期是:"+d.getFullYear()+"-"+mon+"-"+d.getDate());
}
</script>
</head>
<body>
<h1>更改页面颜色</h1>
<p align="left">
<!-- ********FOUND********* -->
<input type="button" value="改变页面设置" onClick="javascript:changeset()">
<!-- ********FOUND********* -->
<input type="button" value="退出" onClick="javascript:window.close()">
</p>
</body>
</html>