去评论
推扬网

智琳:getDocumentBase()是什么意思?

admin
2020/08/11 18:12:56

夏乾良的回答:

getDocumentBase() 获取文件的基本路径 例如: getImage(getDocumentBase(),"Ex7_3.jpg");以基本路径+Ex7_3.jpg文件为基础,取得图像类iImg=getImage(getDocumentBase(),"Ex7_3.jpg");把取得的图像类赋给变量iImg

孙传辉的回答:

getDocumentBase() 获取文件的基本路径 例如: getImage(getDocumentBase(),"Ex7_3.jpg");以基本路径+Ex7_3.jpg文件为基础,取得图像类iImg=getImage(getDocumentBase(),"Ex7_3.jpg");把取得的图像类赋给变量iImg

王小云的回答:

Applet类中getDocumentBase()和getCodeBase()的区别 Applet类中提供了这2种方法帮我门获取URL对象,其中getDocumentBase()方法返回URL对象,代表了包含Applet的HTML文件所在目录,而getCodeBase()方法返回的URL对象代表了applet文件即.class文件所在目录。它根据HTML文件的"Applet"标记中的CODEBASE属性值计算出来,若该属性没有设置则返回该HTML文件所在目录

张文杰的回答:

Applet.getDocumentBase(); public URL getDocumentBase() Gets the URL of the document in which this applet is embedded. For example, suppose an applet is contained within the document: http://java.sun.com/products/jdk/1.2/index.html The document base is: http://java.sun.com/products/jdk/1.2/index.html

佳嘉乐的回答:

Applet.getDocumentBase(); public URL getDocumentBase() Gets the URL of the document in which this applet is embedded. For example, suppose an applet is contained within the document: http://java.sun.com/products/jdk/1.2/index.html The document base is: http://java.sun.com/products/jdk/1.2/index.html