相当简单又小弟又相当急的问题....希高人指点

zjnoall 2010-08-27 02:46:53
在SWT中的Browser类中有一个seturl方法,可以调用超链接,我想请问下这个seturl有三个参数,第一个参数是url地址,后两个参数分别是什么意思?如何在超链接调用以后捕获后两个参数?setUrl('','','');
谢谢大神拯救!
...全文
158 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
shehun 2010-08-28
  • 打赏
  • 举报
回复
好像只有一个参数吧
JAVA_Xiu 2010-08-28
  • 打赏
  • 举报
回复
特意百度了一下 好像只有一个链接的参数
bsr1983 2010-08-28
  • 打赏
  • 举报
回复
api链接http://help.eclipse.org/helios/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html
qq549856159 2010-08-28
  • 打赏
  • 举报
回复
.........o ye
bsr1983 2010-08-28
  • 打赏
  • 举报
回复
setUrl
public boolean setUrl(String url,
String postData,
String[] headers)Begins loading a URL. The loading of its content occurs asynchronously.
If the URL causes an HTTP request to be initiated then the provided postData and header arguments, if any, are sent with the request. A value in the headers argument must be a name-value pair with a colon separator in order to be sent (for example: "user-agent: custom").


Parameters:
url - the URL to be loaded
postData - post data to be sent with the request, or null
headers - header lines to be sent with the request, or null
Returns:
true if the operation was successful and false otherwise.
Throws:
IllegalArgumentException -
•ERROR_NULL_ARGUMENT - if the url is null
SWTException -
•ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
•ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.6
goldyellow34 2010-08-27
  • 打赏
  • 举报
回复
setUrl(String url, String post_data) ? ?? ???
believefym 2010-08-27
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 closewbq 的回复:]

你的是什么版本呀?我记得setUrl就一个参数呀。
[/Quote]

貌似是只有一个参数
http://help.eclipse.org/help33/ntopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html#setUrl%28java.lang.String%29
closewbq 2010-08-27
  • 打赏
  • 举报
回复
你的是什么版本呀?我记得setUrl就一个参数呀。

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧