?? 1.30 代碼測試頁面.htm
字號:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>標(biāo)題頁</title>
</head>
<body>
<script language="JavaScript">
function clear(){
if (form1) {
clear = confirm("確定要關(guān)閉嗎?",''); //關(guān)閉窗口的提示
if(clear) { //清空桌面的內(nèi)容
document.form1.reset();
document.form1.value = "";
}
}
}
function test(){
{
temp = document.form1.mytxt.value; //獲取代碼內(nèi)容
testwin= open("", "testwin","status=no,menubar=yes,toolbar=no");//打開窗口
testwin.document.open();
testwin.document.write(temp); //在窗口內(nèi)輸入內(nèi)容
testwin.document.close(); //關(guān)閉窗口
}
}
function about(){ //“關(guān)于”按鈕的提示
alert("可以直接在頁面中顯示輸入的代碼")
alert("http://www.google.com E-mail:cguanjun168@tom.com")
}
function help(){ //幫助按鈕的效果
OpenWindow=window.open("", "newwin","height=420,width=470,toolbar=no,scrollbars="+scroll+",menubar=no");
OpenWindow.document.write("<body bgcolor='white' text='black' alink='blue'vlink='blue' link='blue'><TITLE>提示</TITLE>")
OpenWindow.document.write("<center>把要顯示的代碼放到上頁的輸入框中,按顯示按鈕就能顯示你的頁面內(nèi)容</center><br>")
OpenWindow.document.write("<center><a href='mailto:cguanjun168@tom.com' target='main'>Email me</a></Center><br>")
OpenWindow.document.write("<center><a href='javaform1:close()'>關(guān)閉窗口</a></Center>")
OpenWindow.document.close()
self.name="main"
}
</script>
<form name="form1">
<textarea name="mytxt" rows="8" cols="50"
wrap="off"></textarea>
<br>
<input type="button" value="顯示" onClick="test()">
<input type="button" value="清除" onClick="clear()">
<input type="button" value="關(guān)于" onClick="about()">
<input type="button" value="幫助" onClick="help()">
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -