ASP代码,下面是只显示一行产品图片,我想显示三行,怎么写
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from CMS_Product where IsClose=0 and IsAudit=1 and ClassID="&ClassID&" and IsNew=0 order by ListID asc"
rs.open sql,conn,1,1
if rs.eof then
else
page=cint(request("page"))
listnum=6
rs.pagesize=listnum
allpage=rs.pagecount
allcount=rs.recordcount
if page="" or page<1 then page=1
if page>allpage then page=allpage
rs.absolutepage=page
j=(page-1)*listnum+1
i=1
%>
答案:rs.pagesize=listnum
这个listnum=3
其他:看注释:
import java.awt.GridLayout;
import javax.swing.*;
public class LoadForm extends JFrame{
private JPanel jpanel1;
private JTextField jtext1;
private JPasswordField password;
private JLabel jlable1;
private JLabel jlable2;
private JButton button1;
private JButton button2;
public LoadForm()
{
super("商品管理系统");
this.setLayout(null);
GridLayout layout=new GridLayout(3,3,10,10);//这句保留
jpanel1=new JPanel();
//jpanel1.setLayout(null);//jpanel1的布局不能为空
jlable1=new JLabel("用户名");
jlable2=new JLabel("密 码");
jtext1=new JTextField();
password=new JPasswordField();
button1=new JButton("确定");
button2=new JButton("取消");
jpanel1.add(jlable1);
jpanel1.add(jtext1);
jpanel1.add(jlable2);
jpanel1.add(password);
jpanel1.add(button1);
jpanel1.add(button2);
//this.add(jpanel1);//写法错误
this.setContentPane(jpanel1);//设置jpanel1为Frame的内容面版
this.setBounds(200,200,100,100);
//this.setSize(200,200);
this.setVisible(true);
}
//main方法测试
public static void main(String args[]){
new LoadForm();
}
}
上一个:在asp2005中提示“无法连接到visual studio的local web服务器”你是怎么解决的?
下一个:asp代码中的重定向怎么取消啊 response.redirect这些都属于重定向嘛?怎么办 急啊 高手快来帮忙