首页 >> 网页特效 >> 代码生成 >> 正文
来源: 不详 | 时间: 2006-1-13 18:52:35 | 人气:
一个QQ菜单编辑器!
<html><head><title>CreateCode</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script language="javascript">//生成代码function createCode(){ totalheight = parseInt(fcreate.bodyheight.value) + fcreate.headheight.value * (fcreate.itemcount.value - 1); textCode.value = text1.value + "var headHeight = " + fcreate.headheight.value + ";" + "var bodyHeight = " + fcreate.bodyheight.value + ";" + "var objcount = " + fcreate.itemcount.value + ";" + "var step = " + fcreate.mspeed.value + ";" + text2.value + ".headtd1 { background: #" + fcreate.headcolorn.value + "; border: 2px outset; border-color: #" + fcreate.lbordern.value + " #" + fcreate.dbordern.value + " #" + fcreate.dbordern.value + " #" + fcreate.lbordern.value + "; cursor: hand; font-size: 9pt}" + ".headtd2 { background: #" + fcreate.headcolora.value + "; border: 2px outset; border-color: #" + fcreate.lbordera.value + " #" + fcreate.dbordera.value + " #" + fcreate.dbordera.value + " #" + fcreate.lbordera.value + "; cursor: hand; font-size: 9pt}" + ".bodytd { background: #" + fcreate.bodycolor.value + "; border: 2px outset; border-color: #" + fcreate.lborderb.value + " #" + fcreate.dborderb.value + " #" + fcreate.dborderb.value + " #" + fcreate.lborderb.value + "; font-size: 9pt}" + text3.value + "<div id='mainboard' style='position:absolute; left:2px; top:2px; width:120px; height:" + totalheight + "px; z-index:1; overflow: hidden; background: #" + fcreate.bodycolor.value + ";'> ";
itemtop = 0; for (i = 1; i <= parseInt(fcreate.itemcount.value); i++) { textCode.value += "<div id='item" + i + "body' style='position:absolute; left:0; top:" + itemtop + "; width:120px; height:" + fcreate.bodyheight.value + "px; z-index:" + (i+1) +"; overflow: hidden'>" + "<table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'>" + "<tr>" + "<td id='item" + i + "head' height='" + (fcreate.headheight.value-2) + "' class=";if (i == 1) textCode.value += "'headtd2'";else textCode.value += "'headtd1'";textCode.value += " onclick='showme(item" + i + "body,this)' align='center'>";//textCode.value += getValue("fcreate.item" + i);textCode.value +=document.all["item"+i].value+"</td>"+ "</tr>" +