在SWT中的Browser类中有一个seturl方法,可以调用超链接,我想请问下这个seturl有三个参数,第一个参数是url地址,后两个参数分别是什么意思?如何在超链接调用以后捕获后两个参数?setUrl('','','');
谢谢大神拯救!

解决方案 »

  1.   

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

  2.   


    貌似是只有一个参数
    http://help.eclipse.org/help33/ntopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html#setUrl%28java.lang.String%29
      

  3.   

    setUrl(String url, String post_data) ? ?? ???
      

  4.   

    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
      

  5.   

    api链接http://help.eclipse.org/helios/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html