返回列表 回复 发帖

JavaScript  问题。

function runEx(){var winEx = window.open('', '', 'resizable,scrollbars'); winEx.document.open('text/html', 'replace');winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));}HTML代码如下:
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
var data ="01";
var done = 1;
function textboxin(text) {
decrypt(text, 5, 1);
}

function textboxout() {
self.text.value = '';
done = 1;
}

function decrypt(text, max, delay)
{
if (done) {
done = 0;
decrypt_helper(text, max, delay,  0, max);
   }
}
function decrypt_helper(text, runs_left, delay, charvar, max)  
{
if (!done) {
runs_left = runs_left - 1;
var box_text = text.substring(0, charvar);
for (var current_char = charvar; current_char < text.length; current_char++) {
box_text += data.charAt(Math.round(Math.random()*data.length));   
}
window.text.value = box_text;

var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ";"
var new_char = charvar + 1;
var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ";"
if(runs_left > 0)
{
  setTimeout(rerun, delay);
}
else {
if (charvar < text.length) {
setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));
}
else {
done = 1;
         }
      }
   }
}
</SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<A href="#" onmouseout=textboxout(); onmouseover="textboxin('鼠标移到超链接上,对链接的说明内容像解密一样');return true;">
<font color="#00CC00"> link</font></A><br>
<br><INPUT class=box name=text size=80>
</body>
</html>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


Remind:此消息由芗城土著在08-14 00:12:28做过手脚,呵呵……
苍白的,不是文字,是人的思想; 虚伪的,不是网络,是人的灵魂。

Re:JavaScript  问题。

function runEx(){var winEx = window.open('', '', 'resizable,scrollbars'); winEx.document.open('text/html', 'replace');winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));}HTML代码如下:
<html><head><title>无标题文档</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><SCRIPT language=JavaScript>var data ="01";var done = 1;function textboxin(text) {decrypt(text, 5, 1);}function textboxout() {self.text.value = '';done = 1;}function decrypt(text, max, delay) {if (done) {done = 0;decrypt_helper(text, max, delay,  0, max);   }}function decrypt_helper(text, runs_left, delay, charvar, max)  {if (!done) {runs_left = runs_left - 1; var box_text = text.substring(0, charvar);for (var current_char = charvar; current_char < text.length; current_char++) {box_text += data.charAt(Math.round(Math.random()*data.length));   }window.text.value = box_text;var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ";"var new_char = charvar + 1;var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ";"if(runs_left > 0)  {  setTimeout(rerun, delay); }else {if (charvar < text.length) {setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1))); }else {done = 1;         }      }   }}</SCRIPT></head><body bgcolor="#FFFFFF" text="#000000"><A href="#" onmouseout=textboxout(); onmouseover="textboxin('鼠标移到超链接上,对链接的说明内容像解密一样');return true;"> <font color="#00CC00"> link</font></A><br><br><INPUT class=box name=text size=80></body></html> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

Re:JavaScript  问题。

function runEx(){var winEx = window.open('', '', 'resizable,scrollbars'); winEx.document.open('text/html', 'replace');winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));}HTML代码如下:
我想要实现  在文本域里 的  “01”  是绿色的。 [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]


Remind:此消息由芗城土著在08-14 00:03:12做过手脚,呵呵……
苍白的,不是文字,是人的思想; 虚伪的,不是网络,是人的灵魂。

Re:JavaScript  问题。

还想出现多个链接。在同一文本域内显示注解。。。
苍白的,不是文字,是人的思想; 虚伪的,不是网络,是人的灵魂。
返回列表