代码如下
//------getparameter.java
import java.awt.*;
import java.applet.*;
public class getparameter extends applet{
private string title;
public void paint(graphics g){
title=getparameter("title");
g.drawstring ("hello world!",20,20);
g.drawstring ("getparameter: "+title,20,50);
}
}
//----------getparameter.htm
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>tansf</title>
</head>
<body>
<applet code="getparameter.class" width="210" height="118">
<param name="title" value="tansf">
</applet>
</body>
</html>
以上代码从htm文件中获取title的值
文章整理:站长天空 网址:http://www.z6688.com/
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




