The Quintessential Applet

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

Every applet must subclass Applet.

import java.applet.*;

import java.awt.*;

public class BasicApplet extends Applet {

public void init() {

// Called once by the browser when

// it starts the applet.

}

public void start() {

// Called whenever the page containing

// this applet is made visible.

}

public void stop() {

// Called whenever the page containing this

// applet is not visible.

}

public void destroyed() {

// Called once when the browser destroys

// this applet.

}

public void paint(Graphics g) {

// Called whenever this applet needs to

// repaint itself.

}

}

This isthe applet's accompanying HTML file.

<applet code=BasicApplet width=100 height=100>

</applet>

你可能感兴趣的:(html,C++,c,C#)