思路:
("0000" + id).substring(("0000" + id).length - 4)

解决方案 »

  1.   

    response.write "<a href='javascript:confirmdel(" & right("0000" & 0001,4) & ","& CurrentPage&")'><font color=#0000FF>删除</font></a>"
      

  2.   

    <%
    id=1
    tempstr="00000000000000000000"+cstr(id)
    response.write right(tempstr,4)
    %>
    多打几个零,你要多长都有了:)
      

  3.   

    what is the datatype of your 数据? if they are 字符型, then
    response.write "<a href='javascript:confirmdel(" & your数据 & ","& CurrentPage&")'><font color=#0000FF>删除</font></a>"
    should just work. If they are numeric, how can they have leading zeros anyway?If they do not have leading zeros, and you'd like to specify how many zeros you want, try something likefunction SetLeadingZero(nZero, nNum)
      SetLeadingZero = String(nZero,"0") & nNum
    end function
    response.write "<a href='javascript:confirmdel(" & SetLeadingZero(3, 1) & ","& CurrentPage&")'><font color=#0000FF>删除</font></a>"and