我想让标题文本可滚动,我让代码在它下面滚动正常,但我输入的文本显示时没有空格,这意味着字符串中的空格不被考虑。
<script type="text/javascript">
//function for tittle scrolling
function scrlsts() {
//var scrltest = " Nature ";
scrltest=document.title;
//alert(scrltest);
scrltest = scrltest.substring(1, scrltest.length) + scrltest.substring(0, 1);
//alert(scrltest);
document.title = scrltest;
setTimeout("scrlsts()", 1000);
}
$(document).ready(function() {
var scrltest = " Nature dff ssfd ";
document.title=scrltest;
scrlsts();
});
</script>
提前致谢