java web开发中的控件动态创建
目前的控件是如下定义的:
private Button button1 = new Button();
public Button getButton1() {
return button1;
}
public void setButton1(Button b) {
this.button1 = b;
}
private Button button2 = new Button();
public Button getButton2() {
return button2;
}
public void setButton2(Button b) {
this.button2 = b;
}
我想在button1 click中创建button3
在button2 click中删除button3
------解决方案--------------------用javascript直接控制页面显示就行了。
------解决方案--------------------是不会对按钮设置事件吗