十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
其實很簡單的哦\x0d\x0a\x0d\x0aimport javax.swing.JOptionPane;\x0d\x0a\x0d\x0apublic class Test {\x0d\x0a\x0d\x0apublic static void main(String[] args) {\x0d\x0aString s=JOptionPane.showInputDialog("請輸入:");\x0d\x0a}\x0d\x0a}\x0d\x0a非常簡單的一個彈消息框的代碼
成都創(chuàng)新互聯(lián)專注于企業(yè)網(wǎng)絡營銷推廣、網(wǎng)站重做改版、永新網(wǎng)站定制設計、自適應品牌網(wǎng)站建設、H5技術(shù)、商城網(wǎng)站定制開發(fā)、集團公司官網(wǎng)建設、成都外貿(mào)網(wǎng)站建設、高端網(wǎng)站制作、響應式網(wǎng)頁設計等建站業(yè)務,價格優(yōu)惠性價比高,為永新等各大城市提供網(wǎng)站開發(fā)制作服務。
jsp servlet?..你可以在Servlet中..reques.setAttribute("error","賬號密碼錯誤!");然后在jsp中.判斷是否存在這個值..再使用javascript彈出咯..jsp:導入包:%@taglib prefix="c" uri=" "%判斷這樣寫:c:if test="${not empty error}"?0?2 ?0?2 ?0?2 input type="hidden" value="${error}" id="error_id"?0?2 ?0?2 ?0?2 script type="text/javascript"?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2!--?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 alert(document.getElementById("error_id").value);?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2//--?0?2 ?0?2 ?0?2 /script/c:if
你試下吧..不懂..Call我
寫了一個很簡單的案例,可以參考和修改
import?java.awt.BorderLayout;
import?java.awt.GridLayout;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?javax.swing.JButton;
import?javax.swing.JDialog;
import?javax.swing.JFrame;
import?javax.swing.JLabel;
import?javax.swing.JTextField;
public?class?FromeDemo?extends?JFrame{
JButton?jbutton;
public?FromeDemo()?{
jbutton?=?new?JButton("彈出2個文本框");
jbutton.addActionListener(new?ActionListener()?{
@Override
public?void?actionPerformed(ActionEvent?e)?{
JDialog?jd?=?new?JDialog();
jd.setBounds(320,?180,?260,?100);
jd.setTitle("彈出文本框");
jd.getContentPane().setLayout(new?GridLayout(2,?2));
jd.add(new?JLabel("文本框一"));
jd.add(new?JTextField(80));
jd.add(new?JLabel("文本框二"));
jd.add(new?JTextField(80));
jd.setModal(true);//確保彈出的窗口在其他窗口前面
jd.setVisible(true);
}
});
add(jbutton,BorderLayout.SOUTH);
setBounds(300,?100,?320,?320);
setTitle("測試");
setDefaultCloseOperation(EXIT_ON_CLOSE);
setVisible(true);
}
public?static?void?main(String?args[])?{
new?FromeDemo();
}
}