显示输入字符的ASCII码值 dn001 2009-06-21 08:35:31 <!-- http://bbs.knowsky.com/ --> <!--要完成此效果需要两个步骤 第一步:把如下代码加入到<head>区域中--> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var msg = "Welcome To The www.knowsky.com"; var chars = msg.length + 1; var updateStatus = ""; var i = 0; function statusMessage() { if (i < chars) setTimeout("nextLetter()", 300); } function nextLetter() { updateStatus = msg.substring(0,i) + '_'; window.status = updateStatus; i++; statusMessage(); } // End --> </script> <!--第二步:把“onLoad="statusMessage()"”加在<body>标记里 例如:--> <body onLoad="statusMessage()">