網站首頁 學習教育 IT科技 金融知識 旅遊規劃 生活小知識 家鄉美食 養生小知識 健身運動 美容百科 遊戲知識 綜合知識
當前位置:趣知科普吧 > 綜合知識 > 

文字方塊怎麼寫

欄目: 綜合知識 / 發佈於: / 人氣:9.27K
1. css 要怎麼寫 文字方塊

代碼書寫格式

文字方塊怎麼寫

<input type="text"/>; 最簡單的

如果你還需要更好看一些的,還可以寫一些css樣式

例如:

css樣式

如果還有什麼不懂,還提問我,希望我的回答,能幫到你

2. 怎麼在文字方塊上寫什麼內容就提示什麼內容

<script language= "javascript">

<!--

function aa()

{

alert(document.form.a1.value);

}

//-->

</script>

<form name= "form">

<input type= "text" name= &qu長擔拜杆之訪瓣詩抱澗ot;a1">

<br>

<input type= "button" value= "onclick" onclick= "aa();">

</form>

要的是這個不?

3. JAVA輸入和輸出文字方塊怎麼寫,求解答

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.awt.event.windowAdapter;

import java.awt.event.WindowEvent;

import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JTextField;

public class XXFrame extends JFrame implements ActionListener

{

private JTextField name = new JTextField("someone");

private JTextField text = new JTextField();

private JButton button = new JButton("輸入");

public XXFrame()

{

super("一個測試框框");

name.setBounds(40, 40, 200, 20);

button.setBounds(260, 40, 100, 20);

text.setBounds(40, 110, 200, 20);

this.setLayout(null);

this.setBounds(200, 200, 400, 400);

this.add(name);

this.add(button);

this.add(text);

this.addWindowListener(new WindowAdapter()

{

public void windowClosing(WindowEvent e)

{

System.exit(-1);

}

});

button.addActionListener(this);

this.setVisible(true);

}

@Override

public void actionPerformed(ActionEvent e)

{

if (e.getSource() == button)

{

text.setText(name.getText());

}

}

public static void main(String[] args)

{

new XXFrame();

}

}

Tags:文字方塊