⑴ 谁给我发点Vb具体是什么东西比如随便的一些代码编写的程序一小段就可以
VB是visual Basic的简称,即初学者通用符号代码,是很容易入门的语言,从BASIC发展而来。
VB是一门编程语言,所以能用VB做的很多很多,基本上除了底层开发(系统软件),VB都能做,而且在数据库应用方面VB也有他独到的一面。
⑵ html <div id="wrapper">是什么意思
html <div id="wrapper">意思是:一个名为抄wrapper的DIV。
即HTML显示数据是按照布局而非语义的。随着网络应用的发内展,各行业对容信息有着不同的需求,这些不同类型的信息未必都是以网页的形式显示出来。例如。当通过搜索引擎进行数据搜索时,按照语义而非按照布局来显示数据会具有更多的优点。
(2)什么是编程1002无标题扩展阅读:
它通过标记符号来标记要显示的网页中的各个部分。网页文件本身是一种文本文件,通过在文本文件中添加标记符,可以告诉浏览器如何显示其中的内容(如:文字如何处理,画面如何安排,图片如何显示等)。
浏览器按顺序阅读网页文件,然后根据标记符解释和显示其标记的内容,对书写出错的标记将不指出其错误,且不停止其解释执行过程,编制者只能通过显示效果来分析出错原因和出错部位。但需要注意的是,对于不同的浏览器。
⑶ 弹出窗口的html的代码是怎么写的
1、最基本的弹出窗口代码
< SCRIPT LANGUAGE="javascript">
< !--
window.open ("page.html")
-- >
< /SCRIPT>
window.open ("page.html") 用于控制弹出新的窗口page.html,如果page.html不与主窗口在同一路径下,前面应写明路径,绝对路径(http://)和相对路径(../)均可。
2、经过设置后的弹出窗口
< SCRIPT LANGUAGE="javascript">
< !--
window.open ("page.html", "newwindow", "height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")
->
< /SCRIPT>
< SCRIPT LANGUAGE="javascript"> js脚本开始;window.open 弹出新窗口的命令;"page.html" 弹出窗口的文件名;"newwindow" 弹出窗口的名字(不是文件名),非必须,可用空"代替;
3、用函数控制弹出窗口
< script LANGUAGE="JavaScript">
< !--
function openwin() {
window.open ("page.html", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
}
-->
< /script>
这里定义了一个函数openwin(),函数内容就是打开一个窗口。
4、同时弹出2个窗口
< script LANGUAGE="JavaScript">
< !--
function openwin() {
window.open ("page.html", "newwindow", "height=100, width=100, top=0, left=0,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
window.open ("page2.html", "newwindow2", "height=100, width=100, top=100, left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
}
-->
< /script>
为避免弹出的2个窗口覆盖,用top和left控制一下弹出的位置不要相互覆盖即可。
5、主窗口打开文件1.htm,同时弹出小窗口page.html
< script language="javascript">
< !--
function openwin() {
window.open("page.html","","width=200,height=200")
}
-->
< /script>
⑷ java的一个简单记事本程序设计
这个功能要全些!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.dbswing.*;
import java.io.*;
import javax.swing.text.*;
import javax.swing.event.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2005</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class Frame1 extends JFrame {
JPanel contentPane;
JMenuBar jMenuBar1 = new JMenuBar();
JMenu jMenuFile = new JMenu();
JMenuItem jMenuFileExit = new JMenuItem();
JMenu jMenuHelp = new JMenu();
JMenuItem jMenuHelpAbout = new JMenuItem();
JLabel statusBar = new JLabel();
BorderLayout borderLayout1 = new BorderLayout();
JScrollPane jScrollPane1 = new JScrollPane();
JTextArea jTextArea1 = new JTextArea();
JMenu jMenu1 = new JMenu();
JMenu jMenu2 = new JMenu();
JMenuItem jMenuItem1 = new JMenuItem();
JMenuItem jMenuItem2 = new JMenuItem();
JMenuItem jMenuItem3 = new JMenuItem();
JMenuItem jMenuItem4 = new JMenuItem();
JMenuItem jMenuItem5 = new JMenuItem();
JMenuItem jMenuItem6 = new JMenuItem();
JMenuItem jMenuItem7 = new JMenuItem();
JMenuItem jMenuItem9 = new JMenuItem();
JMenuItem jMenuItem10 = new JMenuItem();
JMenuItem jMenuItem11 = new JMenuItem();
FontChooser fontChooser1 = new FontChooser();
JCheckBoxMenuItem jCheckBoxMenuItem1 = new JCheckBoxMenuItem();
JFileChooser jFileChooser1 = new JFileChooser();
String currentFileName=null;
boolean motified=false;
Document document1;
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
//Component initialization
private void jbInit() throws Exception {
contentPane = (JPanel) this.getContentPane();
document1 = jTextArea1.getDocument();
contentPane.setLayout(borderLayout1);
this.setSize(new Dimension(600, 400));
this.setTitle("文本编辑器");
statusBar.setText(" ");
jMenuFile.setText("文件");
jMenuFileExit.setText("退出");
jMenuFileExit.addActionListener(new Frame1_jMenuFileExit_ActionAdapter(this));
jMenuHelp.setText("帮助");
jMenuHelpAbout.setText("关于");
jMenuHelpAbout.addActionListener(new Frame1_jMenuHelpAbout_ActionAdapter(this));
jTextArea1.setText("");
jMenu1.setText("编辑");
jMenu2.setText("格式");
jMenuItem4.setText("新建");
jMenuItem4.addActionListener(new Frame1_jMenuItem4_actionAdapter(this));
jMenuItem3.setText("打开");
jMenuItem3.addActionListener(new Frame1_jMenuItem3_actionAdapter(this));
jMenuItem2.setText("保存");
jMenuItem2.addActionListener(new Frame1_jMenuItem2_actionAdapter(this));
jMenuItem1.setText("另存为");
jMenuItem1.addActionListener(new Frame1_jMenuItem1_actionAdapter(this));
jMenuItem5.setText("剪切");
jMenuItem5.addActionListener(new Frame1_jMenuItem5_actionAdapter(this));
jMenuItem6.setText("复制");
jMenuItem6.addActionListener(new Frame1_jMenuItem6_actionAdapter(this));
jMenuItem7.setText("粘贴");
jMenuItem7.addActionListener(new Frame1_jMenuItem7_actionAdapter(this));
jMenuItem9.setText("字体");
jMenuItem9.addActionListener(new Frame1_jMenuItem9_actionAdapter(this));
jMenuItem10.setText("前景色");
jMenuItem10.addActionListener(new Frame1_jMenuItem10_actionAdapter(this));
jMenuItem11.setText("背景色");
fontChooser1.setFrame(this);
fontChooser1.setTitle("字体");
jCheckBoxMenuItem1.setText("自动换行");
jCheckBoxMenuItem1.addActionListener(new Frame1_jCheckBoxMenuItem1_actionAdapter(this));
document1.addDocumentListener(new Frame1_document1_documentAdapter(this));
jMenuFile.add(jMenuItem4);
jMenuFile.add(jMenuItem3);
jMenuFile.add(jMenuItem2);
jMenuFile.add(jMenuItem1);
jMenuFile.addSeparator();
jMenuFile.add(jMenuFileExit);
jMenuHelp.add(jMenuHelpAbout);
jMenuBar1.add(jMenuFile);
jMenuBar1.add(jMenu1);
jMenuBar1.add(jMenu2);
jMenuBar1.add(jMenuHelp);
this.setJMenuBar(jMenuBar1);
contentPane.add(statusBar, BorderLayout.SOUTH);
contentPane.add(jScrollPane1, BorderLayout.CENTER);
jScrollPane1.getViewport().add(jTextArea1, null);
jMenu1.add(jMenuItem5);
jMenu1.add(jMenuItem6);
jMenu1.add(jMenuItem7);
jMenu2.add(jCheckBoxMenuItem1);
jMenu2.add(jMenuItem9);
jMenu2.add(jMenuItem10);
jMenu2.add(jMenuItem11);
}
//File | Exit action performed
public void jMenuFileExit_actionPerformed(ActionEvent e) {
if(giveUp())
System.exit(0);
}
//Help | About action performed
public void jMenuHelpAbout_actionPerformed(ActionEvent e) {
Frame1_AboutBox dlg = new Frame1_AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.pack();
dlg.show();
}
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
//super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
jMenuFileExit_actionPerformed(null);
}
}
void jMenuItem9_actionPerformed(ActionEvent e) {
fontChooser1.setSelectedFont(jTextArea1.getFont());
if(fontChooser1.showDialog())
jTextArea1.setFont(fontChooser1.getSelectedFont());
this.repaint();
}
void jMenuItem10_actionPerformed(ActionEvent e) {
Color color=JColorChooser.showDialog(this,"前景色",jTextArea1.getForeground());
if(color!=null)
jTextArea1.setForeground(color);
this.repaint();
}
void jCheckBoxMenuItem1_actionPerformed(ActionEvent e) {
jTextArea1.setLineWrap(jCheckBoxMenuItem1.isSelected());
}
void jMenuItem5_actionPerformed(ActionEvent e) {
jTextArea1.cut();
}
void jMenuItem7_actionPerformed(ActionEvent e) {
jTextArea1.paste();
}
void jMenuItem6_actionPerformed(ActionEvent e) {
jTextArea1.();
}
void jMenuItem4_actionPerformed(ActionEvent e) {
if(giveUp()){
jTextArea1.setText("");
currentFileName=null;
motified=false;
}
}
void jMenuItem3_actionPerformed(ActionEvent e) {
if(!giveUp()){
return;
}
if(JFileChooser.APPROVE_OPTION==jFileChooser1.showOpenDialog(this)){
openFile(jFileChooser1.getSelectedFile().getPath());
this.repaint();
}
}
void openFile(String fileName){
try{
File file=new File(fileName);
int size=(int)file.length();
int chars_read=0;
FileReader in=new FileReader(file);
char[] data=new char[size];
while(in.ready()){
chars_read+=in.read(data,chars_read,size-chars_read);
}
jTextArea1.setText(new String(data,0,chars_read));
this.currentFileName=fileName;
this.motified=false;
}
catch(IOException e){
jTextArea1.setText("打开文件"+fileName+"错");
}
}
boolean saveFile(){
if(currentFileName==null)
return saveAsFile();
try{
FileWriter out=new FileWriter(currentFileName);
String text=jTextArea1.getText();
out.write(text);
out.close();
this.motified=false;
return true;
}
catch(IOException e){
}
return false;
}
boolean saveAsFile(){
if(JFileChooser.APPROVE_OPTION==jFileChooser1.showSaveDialog(this)){
currentFileName=jFileChooser1.getSelectedFile().getPath();
return saveFile();
}else{
return false;
}
}
void jMenuItem2_actionPerformed(ActionEvent e) {
saveFile();
}
void jMenuItem1_actionPerformed(ActionEvent e) {
saveAsFile();
}
void document1_changedUpdate(DocumentEvent e) {
motified=true;
}
void document1_insertUpdate(DocumentEvent e) {
motified=true;
}
void document1_removeUpdate(DocumentEvent e) {
motified=true;
}
boolean giveUp(){
if(!motified)
return true;
int temp=JOptionPane.showConfirmDialog(this,"保存修改吗?","Text Edit",JOptionPane.YES_NO_CANCEL_OPTION);
switch(temp){
case JOptionPane.YES_OPTION: return saveFile();
case JOptionPane.NO_OPTION: return true;
case JOptionPane.CANCEL_OPTION:
default:
return false;
}
}
}
class Frame1_jMenuFileExit_ActionAdapter implements ActionListener {
Frame1 adaptee;
Frame1_jMenuFileExit_ActionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuFileExit_actionPerformed(e);
}
}
class Frame1_jMenuHelpAbout_ActionAdapter implements ActionListener {
Frame1 adaptee;
Frame1_jMenuHelpAbout_ActionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuHelpAbout_actionPerformed(e);
}
}
class Frame1_jMenuItem9_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem9_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem9_actionPerformed(e);
}
}
class Frame1_jMenuItem10_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem10_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem10_actionPerformed(e);
}
}
class Frame1_jCheckBoxMenuItem1_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jCheckBoxMenuItem1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jCheckBoxMenuItem1_actionPerformed(e);
}
}
class Frame1_jMenuItem5_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem5_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem5_actionPerformed(e);
}
}
class Frame1_jMenuItem7_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem7_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem7_actionPerformed(e);
}
}
class Frame1_jMenuItem6_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem6_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem6_actionPerformed(e);
}
}
class Frame1_jMenuItem4_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem4_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem4_actionPerformed(e);
}
}
class Frame1_jMenuItem3_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem3_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem3_actionPerformed(e);
}
}
class Frame1_jMenuItem2_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem2_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem2_actionPerformed(e);
}
}
class Frame1_jMenuItem1_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jMenuItem1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem1_actionPerformed(e);
}
}
class Frame1_document1_documentAdapter implements javax.swing.event.DocumentListener {
Frame1 adaptee;
Frame1_document1_documentAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void insertUpdate(DocumentEvent e) {
adaptee.document1_insertUpdate(e);
}
public void removeUpdate(DocumentEvent e) {
adaptee.document1_removeUpdate(e);
}
public void changedUpdate(DocumentEvent e) {
adaptee.document1_changedUpdate(e);
}
}