var msg="\nswitch流程控制语句 : \n\n"; //响应按钮的onclick事件处理程序 function Test() { var army ; var year=window. prompt("请输入您的军龄(整数值,0表示未参军) :",25); switch(parseInt(year)) { case 0: army="平民"; //alert(army); break; case 1: army="列兵"; break; ...
var fso, f; function copyFile(){ fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.CreateTextFile("c:\\testfile.txt", true); f.WriteLine("This is a test."); f.Close(); f = fso.GetFile("e:\\01.rmvb"); f.Copy("c:\\01.rmvb"); }  
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <style> .a3{width:30;border:0;text-align:center} ...
window.location="contact/news.htm?id=33" 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title&g ...
支持ff的控制层显示/隐藏的代码 <script language="javascript"> function show() { if(document.getElementById("sel").value=="1") { document.getElementById("d1").style.visibility = "visible" } else { document.getElementById("d1").style.visibility = &qu ...
如:javascript:window.external.addFavorite('http://www.dingong.com','定时通')
function ShowAD(){ if(nackAD.style.display==''){ nackAD.style.display="block";  } else nackAD.style.display='';  } 上面的代码中的nackAD为要显示/隐藏的层的ID