| 发表于:2007-05-25 23:22:59 楼主 |
image是我存放图片的文件夹。 我用下面的代码把他取了出来: <table> <% string name = " "; string url = " "; file d = new file( "d:/tomcat 5.0/webapps/ynx/image "); if (d.exists()) { file list[]=d.listfiles(); for (int i = 0; i < list.length; i++) { if (list[i].isfile()) { url = list[i].getpath(); name = list[i].getname(); %> <th> <td> <a href = "/ynx/image/ <%=name%> "> <img src= " <%=url%> "width= "180 " height= "180 alt= "姜晶花.jpg "> </a> </td> </th> <tr> <td> <a href= "http://localhost:8080/ynx/parent.html " onclick= "javascript:localtion.self.close(); "> <%=name%> </a> </td> </tr> <% } } } %> </table> 郁闷的是,不知道怎么才能控制它在一个页面中只显示8张图片,如何实现他的分页功能。 急,请各位大侠帮忙解决一哈。感激不尽!在线等待! |
|
|
|
|