在 asp  的页面中 有写  这样的 函数或是方法  sub pictable()…… end sub然后在 上面用 call pictable()  调用。请问在jsp页面中 要怎样改写呢? 才好呢!帮忙下!谢谢

解决方案 »

  1.   

    jsp叶面上最好不要写代码
    建议先看看java基础。
      

  2.   

    把方法写在某个类中,在jsp中引用这个类,调用类的方法。
    如果是业务方法,建议写在servlet或action里
      

  3.   

    sub pictable()
    if rs("pic_s")="" then%>
          <table width="120" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="30" height="35" align="right"><font color="#CCCCCC" size="5">┏</font></td>
              <td width="60"><font color="#CCCCCC" size="7">&nbsp;</font></td>
              <td width="30"><font color="#CCCCCC" size="5">┓</font></td>
            </tr>
            <tr> 
              <td height="35" align="right"><font color="#CCCCCC">&nbsp;</font></td>
              <td align="center"><b><font color="#CCCCCC" size="4">无图</font></b></td>
              <td><font color="#CCCCCC">&nbsp;</font></td>
            </tr>
            <tr> 
              <td height="35" align="right"><font color="#CCCCCC" size="5">┗</font></td>
              <td><font color="#CCCCCC" size="7">&nbsp;</font></td>
              <td><font color="#CCCCCC" size="5">┛</font></td>
            </tr>
          </table>
          <%else%><table border="0" cellpadding="0" cellspacing="1" bgcolor="#666666">
      <tr>
        <td bgcolor="#FFFFFF"><a href="picture.asp?pic_b=<%=rs("id")%>" target=_blank><img src="<%=rs("pic_s")%>" border=0></a></td>
      </tr>
    </table>
    <%end if%><br><table width="90%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center"><a href="picture.asp?pic_b=<%=rs("id")%>" target=_blank><font size="2"><u><%=rs("p_name")%></u></font></a></td>
      </tr>
    </table>
    <%end sub%>
    这个是在asp中的哪个  函数,象这样的函数,该怎样起手呢?
      

  4.   

    我是想把某个 asp网站  改成 jsp 的,只是遇到 asp中的这个 函数不知道怎样去改,请各位指点下!谢谢。
      

  5.   

    改成function寫進jsp?
    可以考慮下哦 LZ
      

  6.   

    其实我也只是想到应该是 用  function改写,其他的就想不到别的什么了。我去试下,不过我对这个函数不熟悉,不知道怎么改……!^.^\\