首尾连接的文字动向上

来源:百度知道 编辑:UC知道 时间:2024/05/25 10:48:36
首尾连接的文字动向上

<script language="JavaScript" defer>
//qswh's original and modifid by windy_sk <windy_sk@126.com> 20040120

function reportError(msg,url,line) {
var str = "You have found an error as below: \n\n";
str += "Err: " + msg + " on line: " + line;
alert(str);
return true;
}

window.onerror = reportError;
var obj_marquee = document.getElementById("marquee");
var repeat = null;
var marquee_spd = 50;

function marquee_init() {
var obj_unit = obj_marquee.firstChild;
//alert(obj_unit.offsetWidth);
var marquee_high = parseInt(obj_marquee.style.height);
var marquee_wide = parseInt(obj_marquee.style.width);

var unit_high = obj_unit.offsetHeight;
var unit_wide = obj_unit.offsetWidth;
var m = 0, n = 0, i = 0;
var tmp = null;

m = Math.ceil(marquee_wide / unit_wide);
n = Math.ceil(marquee_high