欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

          <bdo id='0i5a2ehg'></bdo><ul id='2kx9474s'></ul>
      1. <small id='veb7xtcn'></small><noframes id='iund4qko'>

        <i id='oumt1zdx'><tr id='6jnt1df9'><dt id='hlyt4rwu'><q id='jgmjyfem'><span id='ysf84zt0'><b id='xsmrfneo'><form id='bellx95n'><ins id='ovgz6lij'></ins><ul id='3kaxh9mn'></ul><sub id='ql1xpj2p'></sub></form><legend id='v5d1yhfh'></legend><bdo id='xi6zk1ms'><pre id='ykga4qwk'><center id='dmsa5f8x'></center></pre></bdo></b><th id='9l3ohoan'></th></span></q></dt></tr></i><div class="c8jzdxauzz" id='f5qzy80d'><tfoot id='meseaxmi'></tfoot><dl id='7u7139kq'><fieldset id='0h79cw3c'></fieldset></dl></div>

        <legend id='kxglobd7'><style id='z3agsm4s'><dir id='xfs12lcl'><q id='3kaxibx4'></q></dir></style></legend>

      2. <tfoot id='j730nk16'></tfoot>
      3. 歡迎來(lái)到入門(mén)教程網(wǎng)!

        Java編程

        當(dāng)前位置:主頁(yè) > 軟件編程 > Java編程 >

        對(duì)話框代碼java java對(duì)話框分為_(kāi)_____和_______兩種

        來(lái)源:本站原創(chuàng)|時(shí)間:2023-04-09|欄目:Java編程|點(diǎn)擊: 次

        java中程序輸入輸出以對(duì)話框的形式表現(xiàn)怎么做?

        !doctypehtml

        html

        head

        metacharset="UTF-8"

        titleDocument/title

        /head

        body

        buttononclick="mal()"第一種:alert/button

        buttononclick="mpro()"第二種:prompt/button

        buttononclick="mcon()"第三種:confirm/button

        script

        functionmal(){

        alert('這是一個(gè)普通的提示框');

        }

        functionmpro(){

        varval=prompt('這是一個(gè)可輸入的提示框','這個(gè)參數(shù)為輸入框默認(rèn)值,可以不填哦');

        //prompt會(huì)把輸入框的值返回給你

        }

        functionmcon(){

        varboo=confirm('這是一個(gè)可選擇的提示框,3種提示方式,學(xué)會(huì)了嗎?')

        //confirm會(huì)返回你選擇的選項(xiàng),然后可以依據(jù)選擇執(zhí)行邏輯

        if(boo){

        alert('學(xué)會(huì)了,真聰明');

        }else{

        alert('再來(lái)一遍吧')

        }

        }

        /script

        /body

        /html

        急需一個(gè)java編程實(shí)現(xiàn)的簡(jiǎn)單聊天窗口代碼

        import java.awt.*;

        import java.awt.event.*;

        import javax.swing.*;

        import java點(diǎn)虐.*;

        import java.io.*;

        public class ClientDemo01 {

        public static void main(String[] args){

        JFrame f=new JFrame("AA");

        JPanel p1=new JPanel();

        JPanel p2=new JPanel();

        JTextArea ta=new JTextArea(15,30);

        ta.setEditable(false); //文本域只讀

        JScrollPane sp=new JScrollPane(ta); //滾動(dòng)窗格

        JTextField tf=new JTextField(20);

        JButton b=new JButton("發(fā)送");

        p1.add(sp);

        p2.add(tf);

        p2.add(b);

        f.add(p1,"Center");

        f.add(p2,"South");

        f.setBounds(300,300,360,300);

        f.setVisible(true);

        f.setResizable(false);

        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        Socket socket=null;

        BufferedInputStream bis=null;

        BufferedOutputStream bos=null;

        try{

        socket=new Socket("192.168.0.4",5000);

        bis=new BufferedInputStream(socket.getInputStream());

        bos=new BufferedOutputStream(socket.getOutputStream());

        MyThread01 mt=new MyThread01(bis,ta);

        mt.start();

        }catch(Exception e){

        e.printStackTrace();

        }

        b.addActionListener(new ButtonActionListener01(tf,ta,bos));

        }

        }

        class ButtonActionListener01 implements ActionListener{

        JTextField tf;

        JTextArea ta;

        BufferedOutputStream bos;

        public ButtonActionListener01(JTextField tf,JTextArea ta,BufferedOutputStream bos){

        this.tf=tf;

        this.ta=ta;

        this.bos=bos;

        }

        public void actionPerformed(ActionEvent e){

        String message=tf.getText();

        if(!message.equals("")){

        tf.setText(""); //清空文本框

        ta.append("AA:"+message+"\n"); //添加到文本域并換行

        try{

        bos.write(message.getBytes());

        bos.flush();

        }catch(Exception ex){

        System.out.println("發(fā)送失敗");

        }

        }

        }

        }

        class MyThread01 extends Thread{

        BufferedInputStream bis;

        JTextArea ta;

        public MyThread01(BufferedInputStream bis,JTextArea ta){

        this.bis=bis;

        this.ta=ta;

        }

        public void run(){

        try{

        while(true){

        byte[] b=new byte[100];

        int length=bis.read(b);

        String message=new String(b,0,length);

        ta.append("BB:"+message+"\n");

        }

        }catch(Exception e){

        e.printStackTrace();

        }

        }

        } import java.awt.*;

        import java.awt.event.*;

        import javax.swing.*;

        import java點(diǎn)虐.*;

        import java.io.*;

        public class ServerDemo01{

        public static void main(String[] args){

        JFrame f=new JFrame("BB");

        JPanel p1=new JPanel();

        JPanel p2=new JPanel();

        JTextArea ta=new JTextArea(12,30); //文本域,第一個(gè)參數(shù)為行數(shù),第二個(gè)參數(shù)為列數(shù)

        ta.setEditable(false); //文本域只讀

        JScrollPane sp=new JScrollPane(ta); //滾動(dòng)窗格

        JTextField tf=new JTextField(20);

        JButton b=new JButton("發(fā)送");

        p1.add(sp);

        p2.add(tf);

        p2.add(b);

        f.add(p1,"Center");

        f.add(p2,"South");

        f.setBounds(300,300,360,300);

        f.setVisible(true);

        f.setResizable(false);

        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        ServerSocket server=null;

        Socket socket=null;

        BufferedInputStream bis=null;

        BufferedOutputStream bos=null;

        try{

        server=new ServerSocket(5000);

        //ta.append("等待AA連接...\n");

        socket=server.accept();

        //ta.append("AA已連接\n");

        bis=new BufferedInputStream(socket.getInputStream());

        bos=new BufferedOutputStream(socket.getOutputStream());

        MyThread1 mt=new MyThread1(bis,ta);

        mt.start();

        }catch(Exception e){

        e.printStackTrace();

        }

        b.addActionListener(new ButtonActionListener1(tf,ta,bos));

        }

        }

        class ButtonActionListener1 implements ActionListener{

        JTextField tf;

        JTextArea ta;

        BufferedOutputStream bos;

        public ButtonActionListener1(JTextField tf,JTextArea ta,BufferedOutputStream bos){

        this.tf=tf;

        this.ta=ta;

        this.bos=bos;

        }

        public void actionPerformed(ActionEvent e){

        String message=tf.getText(); //獲取文本框中的內(nèi)容

        if(!message.equals("")){

        tf.setText(""); //清空文本框

        ta.append("BB:"+message+"\n"); //添加到文本域并換行

        try{

        bos.write(message.getBytes());

        bos.flush();

        }catch(Exception ex){

        System.out.println("發(fā)送失??!");

        }

        }

        }

        }

        class MyThread1 extends Thread{

        BufferedInputStream bis;

        JTextArea ta;

        public MyThread1(BufferedInputStream bis,JTextArea ta){

        this.bis=bis;

        this.ta=ta;

        }

        public void run(){

        try{

        while(true){

        byte[] b=new byte[100];

        int length=bis.read(b);

        String message=new String(b,0,length);

        ta.append("AA:"+message+"\n");

        }

        }catch(Exception e){

        e.printStackTrace();

        }

        }

        }

        java中經(jīng)過(guò)if語(yǔ)句判斷后想彈出提示對(duì)話框 如何寫(xiě)代碼?要求是(若用戶名或密碼為空(包括空格字符)則提示

        if(true){

        out.println("scriptalert('彈出來(lái)了');/script");

        }

        // 上面這個(gè)是寫(xiě)在JSP 頁(yè)面上的.

        "要求是(若用戶名或密碼為空(包括空格字符)則提示"

        你的意思是不是你在做登陸的時(shí)候要求用戶輸入用戶名和密碼? 而且不能為空?

        如果是這樣的話,你可以在 提交 按鈕上加一句 onclick ='checkinfo()' .調(diào)用一個(gè) JS來(lái)進(jìn)行判定.

        JS可以寫(xiě)成...

        if(document.getElementByID("用戶名").value==null || document.getElementByID("用戶名").value=="")

        {

        alert("請(qǐng)輸入用戶名");

        retrun false ;

        }else if(document.getElementByID("密碼").value==null || document.getElementByID("密碼").value=="")

        {

        alert("請(qǐng)輸入密碼");

        retrun false ;

        }else {

        return true ;

        }

        這樣的話,在你點(diǎn)提交的時(shí)候,會(huì)先進(jìn)行JS的驗(yàn)證, 如果有其中一項(xiàng)沒(méi)有填寫(xiě)則回彈出對(duì)應(yīng)的提示框,并返回false.表單提交不了.......否則返回一個(gè)真值, 這個(gè)時(shí)候你的 表單就能順利提交了....

        <i id='jk9amg37'><tr id='i7cge7bs'><dt id='1pjx7rge'><q id='faknxav8'><span id='k91v5n9w'><b id='bzihehbr'><form id='cc9ahwrg'><ins id='zur77nf7'></ins><ul id='4gzdme4o'></ul><sub id='yuj784q4'></sub></form><legend id='8qm746mv'></legend><bdo id='0z07u9dv'><pre id='9i7asbo0'><center id='pwb8drj2'></center></pre></bdo></b><th id='0zc4snd0'></th></span></q></dt></tr></i><div class="c8jzdxauzz" id='lvkc5oyr'><tfoot id='6nuzy35q'></tfoot><dl id='zcxcjtbv'><fieldset id='r9cvyb85'></fieldset></dl></div>

          <small id='iiqnznec'></small><noframes id='x42dooyc'>

              <tfoot id='03cqf1ok'></tfoot>
                  <tbody id='gmgyfr6k'></tbody>
                <legend id='umila7t1'><style id='ebn6e09w'><dir id='1ktecp0q'><q id='tuodi164'></q></dir></style></legend>
                • <bdo id='knhz63mn'></bdo><ul id='e4xpv37k'></ul>
                • 上一篇:java堆的基本代碼 java 堆的結(jié)構(gòu)

                  欄    目:Java編程

                  下一篇:沒(méi)有了

                  本文標(biāo)題:對(duì)話框代碼java java對(duì)話框分為_(kāi)_____和_______兩種

                  本文地址:http://mengdiqiu.com.cn/a1/Javabiancheng/17335.html

                  網(wǎng)頁(yè)制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語(yǔ)言數(shù)據(jù)庫(kù)服務(wù)器

                  如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

                  聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

                  Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有

                  <i id='o3md3ws3'><tr id='ymh3jakk'><dt id='g3o07227'><q id='rkgnktkc'><span id='iru0c7l9'><b id='nfnz4w1u'><form id='6zuo9ice'><ins id='g0wypkv6'></ins><ul id='fjajhmml'></ul><sub id='fihdrvly'></sub></form><legend id='ot7f4h3j'></legend><bdo id='26l3gqmd'><pre id='0aph4zxy'><center id='km87hxxb'></center></pre></bdo></b><th id='ogkckut8'></th></span></q></dt></tr></i><div class="c8jzdxauzz" id='wtjbymeo'><tfoot id='9v8j3ctu'></tfoot><dl id='sin97qoe'><fieldset id='s1gara27'></fieldset></dl></div>
                        <bdo id='5pw9ovmh'></bdo><ul id='4nmy53n5'></ul>

                    1. <small id='47u2yvbe'></small><noframes id='d2k7s6uw'>

                    2. <legend id='79pzgz1u'><style id='w8mxlm2h'><dir id='5g9vewn0'><q id='w9eilyoa'></q></dir></style></legend>

                      <tfoot id='qlqq2q6f'></tfoot>