document.write('<img border="0" src="images/ruxue'+ var1 +'.gif" width="45" height="14">')

解决方案 »

  1.   

    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);我想这样为什么不行???