用jsni也没能解决,我需要弹出一个播放器
public class Popup implements EntryPoint {

        @Override
        public void onModuleLoad() {

                final Button button = new Button("click me");
                button.addClickHandler(new ClickHandler() {

                        @Override
                        public void onClick(ClickEvent event) {
                                // Window.open("http://baidu.com";, 
"_blank=true",
                                // "resizable=yes");
                                popup();
                        }
                });
                RootPanel.get().add(button);
        }

        public native void popup()/*-{
                top.fun();
        }-*/;
}

******************************************************************************************
<script>
        function fun(){
          var nWidth = screen.availWidth;
                  var nHeight = screen.availHeight;
                  if (nWidth > 820){
                      nWidth = 980;
                      nHeight = 640;
                  }
                  var strOptions = "width=" + nWidth + "height=" + nHeight;
                  strOptions += ",resizable=yes";
                  strOptions += ",status=1, toolbar=0, location=0, menubar=0,
scrollbars=0";

                  window.open("http://www.baidu.com","_blank",strOptions);
        }
</script>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to