好的,所以我已经走到了这一步,创建了键入文本的 javascript 效果。但这显然不允许我将 html 标记传递为可识别的。这意味着我不能在其中使用链接等。
任何想法如何解决这个问题?:S
<div id="Container"></div>
<script type="text/javascript" language="javascript">
var myString = "This is the text that will be typed...";
var myArray = myString.split("");
var loopTimer;
function textLooper() {
if(myArray.length > 0) {
document.getElementById("Container").innerHTML += myArray.shift();
} else {
clearTimeout(loopTimer);
}
loopTimer = setTimeout('textLooper()',70);
}
textLooper();
</script>
它不必只是 js 解决方案,任何有效的东西,所有的想法都是受欢迎的。
谢谢你。