复制代码代码如下 :
<html>
<meta http-equiv = "content-type"content = "text /html; charset = utf-8" />
<헤드>
<제목> </title>
<script type = "text/javaScript">
기능 리더 (Content, CID, StopId, 계속) {
this.conload = document.getElementById (CID);
this.stopbtn = document.getElementById (stopid);
this.continuebtn = document.getElementById (계속);
this.content = 내용;
this.index = 0;
var t = 이것;
this.stopbtn.onclick = (
기능 () {
return function () {
T.StopReader (T);
};
})(티);
this.continuebtn.onclick = (
기능 () {
return function () {
T.continueReader (t);
};
})(티);
}
reader.prototype = {
Startreader : function () {
var t = 이것;
t.toid = setInterval (function () {
if (t.content [t.index]) {
t.conload.innerhtml += t.content [t.index];
}
T.index ++;
if (t.content.length == T.index) {
ClearInterval (t.toid);
t.conload.innerhtml += "【未完待续】";
}
}, 200);
},
stopreader : function (t) {
t.flag = true;
ClearInterval (t.toid);
},
continuereader : function (t) {
if (t.flag)
T.startreader ();
t.flag = false;
}
};
var content = "蒙古亲王僧格林沁悍勇猛 蒙古亲王僧格林沁悍勇猛, 他率领的军队向来号称能征惯战, 八旗兵、绿营他都看不上眼, 更何况那些临时招募的练勇。可偏偏就是这些他眼中的乌合之众, 这些年来在江南战果累累 这些年来在江南战果累累, 最终攻下了江宁, 夺得了对太平军作战的全胜。 " +
"他的蒙古铁骑在与捻军的角逐中常常打败仗, ,, 相形之下, 相形之下, 昔日的声威锐减。这个一代天骄的后裔, 对曾氏兄弟和湘军窝着一肚皮无名怒火。" +
"打劫财富 ,, ,, 屠城纵火, 又放走幼天王, 又放走幼天王, 朝野谤四起, 物议沸腾, 僧格林沁听了十分得意, 赶紧打发富明阿以视察满城为由, 去江宁实地了解。谁料曾国荃一吓一贿征服了富明阿, 江宁将军回去后向僧格林沁作了假汇报。 ";
// 页面加载完成之后执行。
Window.onload = function () {
새로운 독자 (콘텐츠, "내용", "btnstop", "btncontinue"). Startreader ();
};
</스크립트>
<body>
<div id = 'content'> </div>
<div id = 'Operate'> <입력 유형 = 'button'id = 'btnstop'value = 'stop'/> <입력 유형 = 'button'id = 'btncontinue'value = '계속'/> </div
</body>
</html>