<meta charset="utf-8">
<b id="b1" style="float:left;"></b><b id="b2" style="float:left;">_</b>
<button onclick="test()">再试一次</button>
<script>
test();
function test(){
b1.innerHTML = '';
var timer2 = setInterval(function(){
yan();
}, 200);
var i = 0;
function yan() {
var arr = ['好','在','天','涯','李','使','君',',','江','头','相','见','日','黄','昏','。'];
b1.innerHTML += arr[i];
i++;
if (i >= arr.length) {
clearInterval(timer2);
setInterval(function(){
if (b2.style.display == "block") {
b2.style.display = "none";
}
else {
b2.style.display = "block";
}
}, 500);
}
}
}
</script>
对象 | 描述 |
---|---|
Array 对象 | |
Boolean 对象 | |
Date 对象 | |
Math 对象 | |
Number 对象 | |
String 对象 | |
RegExp 对象 | |
全局属性和函数 |
对象 | 描述 |
---|---|
Window 对象 | |
Navigator 对象 | |
Screen 对象 | |
History 对象 | |
Location 对象 |
对象 | 描述 |
---|---|
HTML Document | |
HTML Element | |
HTML Attributes | |
HTML Events |
对象 | 描述 |
---|---|
Anchor 对象 | |
Area 对象 | |
Base 对象 | |
Body 对象 | |
Frame/IFrame 对象 | |
Frameset 对象 | |
Link 对象 | |
Meta 对象 | |
Object 对象 |
Image 对象 | |
Option 对象 | |
Select 对象 | |
Style 对象 | |
Table 对象 | |
td / th 对象 | |
tr 对象 | |
Button 对象 | |
Form 对象 | |
Textarea 对象 |
Input Button 对象 | |
Input Checkbox 对象 | |
Input File 对象 | |
Input Hidden 对象 | |
Input Password 对象 | |
Input Radio 对象 | |
Input Reset 对象 | |
Input Submit 对象 | |
Input Text 对象 |
Input Range 对象 | |
Input Number 对象 | |
Input Date 对象 | |
Input Datetime 对象 | |
Input Datetime-local 对象 | |
Input Email 对象 | |
Input Month 对象 | |
Input Search 对象 | |
Input Tel 对象 | |
Input Time 对象 | |
Input Url 对象 | |
Input Week 对象 |