在htm页面中如何输出javascript变量??? document.write('<img border="0" src="images/ruxue'+ var1 +'.gif" width="45" height="14">') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var picArray = new Array; var widArray = new Array; function xuanzhe(picName,picWidth) { picArray=picName.split(","); widArray=picWidth.split(","); alert(picArray[0]); alert(picName); alert(picWidth); } var tempstr; tempstr="<table border='0' align='left' cellpadding='0' cellspacing='0'>" + "<tr>" + "<td><img border='0' src='images/right.gif' width='18' height='14'></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_jj.asp'><img border='0' onclick="xuanzhe('1,2,2,2,2,2,2,2,2,2,2,2','45,38,38,38,37,38,38,38,38,38,38,37')" src='images/jianjie0" + picArray[0] + ".gif' width='"+ widArray[0] + "' height='14' ></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_rx.asp'><img border='0' onclick="xuanzhe('','') src='images/ruxue0" + picArray[1] + ".gif' width='"+ widArray[1] + "' height='14' ></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_jl.asp'><img border='0' onclick="xuanzhe('','') src='images/jialin0" + picArray[2] + ".gif' width='"+ widArray[2] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_jli.asp'><img border='0'onclick="xuanzhe('','') src='images/jianli0" + picArray[3] + ".gif' width='"+ widArray[3] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_cf.asp'><img border='0' onclick="xuanzhe('','') src='images/chufen0" + picArray[4] + ".gif' width='"+ widArray[4] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_yd.asp'><img border='0' onclick="xuanzhe('','') src='images/yidong0" + picArray[5] + ".gif' width='"+ widArray[5] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_cj.asp'><img border='0' onclick="xuanzhe('','') src='images/chengji0" + picArray[6] + ".gif' width='"+ widArray[6] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_zc.asp'><img border='0' onclick="xuanzhe('','') src='images/zhuche0" + picArray[7] + ".gif' width='"+ widArray[7] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_jd.asp'><img border='0' onclick="xuanzhe('','') src='images/jiandai0" + picArray[8] + ".gif' width='"+ widArray[8] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_tj.asp'><img border='0' onclick="xuanzhe('','') src='images/tijian0" + picArray[9] + ".gif' width='"+ widArray[9] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_jx.asp'><img border='0' onclick="xuanzhe('','') src='images/junxun0" + picArray[10] + ".gif' width='"+ widArray[10] + "' height='14'></a></td>" + "<td><a target='fbuttom' href='../xqgl/xsflxx_by.asp'><img border='0' onclick="xuanzhe('','') src='images/biyie0" + picArray[11] + ".gif' width='"+ widArray[11] + "' height='14'></a></td>" + "<td><img border='0' src='images/right.gif' width='188' height='14'></td>" + "</tr>" + "</table>"; document.write(tempstr);我想这样为什么不行??? 奇怪的Javascript四舍五入 getElementById 能取几个select的length吗 不同目录写cookie问题,解决立刻给分 AJAX菜题 为什么取不到输出的值 求一正则表达式 请问怎么包含一个js文件? ASCII转换,将数字转换成对应字母的属性是什么? 按钮是用图片,可以实现敲回车就提交form么?? 请问VBSCRIPT和JAVASCRIPT怎么共用变量 javascript中,去掉字符串空格的函数是哪个,急急急! 如何实现两个button交替隐藏? 请问一个层(div)里面是否能包含一个网页?如果可以是否可以用js脚本控制?
var widArray = new Array;
function xuanzhe(picName,picWidth)
{
picArray=picName.split(",");
widArray=picWidth.split(",");
alert(picArray[0]);
alert(picName);
alert(picWidth);
}
var tempstr;
tempstr="<table border='0' align='left' cellpadding='0' cellspacing='0'>" +
"<tr>" +
"<td><img border='0' src='images/right.gif' width='18' height='14'></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_jj.asp'><img border='0' onclick="xuanzhe('1,2,2,2,2,2,2,2,2,2,2,2','45,38,38,38,37,38,38,38,38,38,38,37')" src='images/jianjie0" + picArray[0] + ".gif' width='"+ widArray[0] + "' height='14' ></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_rx.asp'><img border='0' onclick="xuanzhe('','') src='images/ruxue0" + picArray[1] + ".gif' width='"+ widArray[1] + "' height='14' ></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_jl.asp'><img border='0' onclick="xuanzhe('','') src='images/jialin0" + picArray[2] + ".gif' width='"+ widArray[2] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_jli.asp'><img border='0'onclick="xuanzhe('','') src='images/jianli0" + picArray[3] + ".gif' width='"+ widArray[3] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_cf.asp'><img border='0' onclick="xuanzhe('','') src='images/chufen0" + picArray[4] + ".gif' width='"+ widArray[4] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_yd.asp'><img border='0' onclick="xuanzhe('','') src='images/yidong0" + picArray[5] + ".gif' width='"+ widArray[5] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_cj.asp'><img border='0' onclick="xuanzhe('','') src='images/chengji0" + picArray[6] + ".gif' width='"+ widArray[6] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_zc.asp'><img border='0' onclick="xuanzhe('','') src='images/zhuche0" + picArray[7] + ".gif' width='"+ widArray[7] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_jd.asp'><img border='0' onclick="xuanzhe('','') src='images/jiandai0" + picArray[8] + ".gif' width='"+ widArray[8] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_tj.asp'><img border='0' onclick="xuanzhe('','') src='images/tijian0" + picArray[9] + ".gif' width='"+ widArray[9] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_jx.asp'><img border='0' onclick="xuanzhe('','') src='images/junxun0" + picArray[10] + ".gif' width='"+ widArray[10] + "' height='14'></a></td>" +
"<td><a target='fbuttom' href='../xqgl/xsflxx_by.asp'><img border='0' onclick="xuanzhe('','') src='images/biyie0" + picArray[11] + ".gif' width='"+ widArray[11] + "' height='14'></a></td>" +
"<td><img border='0' src='images/right.gif' width='188' height='14'></td>" +
"</tr>" +
"</table>";
document.write(tempstr);我想这样为什么不行???