The following code can display the full-screen button in the web page, but cannot display the web page. In addition, how to run the full-screen JS function in the web page after displaying the web?
Macro Macro6
Click the full screen button, it can not display the full screen of the webpage, but directly open the HTML file with IE browser, click the button is full screen
The following web page file can be opened normally in Internet Explorer 11. I can also click the full screen button to make the web page full screen display.
Macro Macro6
str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 374 232 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 374 232 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "3"
str ax3SHD
ax3SHD=
;<html>
;;;;<head>
;;;;;;;;<title>test</title>
;;;;;;;;<style type="text/css" media="screen">
;;;;;;;;;;;;html, body { height:100%;width:100% }
;;;;;;;;;;;;body { margin:0; padding:0; overflow:hidden; text-align:center;
;;;;;;;;;;;;;;;;;;;background-color: #ffffff; }
;;;;;;;;</style>
;;;;</head>
;;;;<body>
;;;;;;;;<button onclick="fullScreen()">Full screen</button>
;;;;;;;;<button onclick="exitScreen()">Exit Full Screen</button>
;;;;;;;;
;;;;;;;;<iframe style="width:100%;height:100%" src="http://fs.focusky.com.cn/jhgh/glyv/index.html" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true" ></iframe>
;;;;</body>
;
;;;;<script type="text/javascript">
;;;;;;;;//full screen
;;;;;;;;function fullScreen(){
;;;;;;;;;;;;var el = document.documentElement;
;;;;;;;;;;;;var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;
;;;;;;;;;;;;;;;;if(typeof rfs != "undefined" && rfs) {
;;;;;;;;;;;;;;;;;;;;rfs.call(el);
;;;;;;;;;;;;;;;;};
;;;;;;;;;;;;;;return;
;;;;;;;;}
;;;;;;;;//Exit Full Screen
;;;;;;;;function exitScreen(){
;;;;;;;;;;;;if (document.exitFullscreen) {
;;;;;;;;;;;;;;;;document.exitFullscreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;else if (document.mozCancelFullScreen) {
;;;;;;;;;;;;;;;;document.mozCancelFullScreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;else if (document.webkitCancelFullScreen) {
;;;;;;;;;;;;;;;;document.webkitCancelFullScreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;else if (document.msExitFullscreen) {
;;;;;;;;;;;;;;;;document.msExitFullscreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;if(typeof cfs != "undefined" && cfs) {
;;;;;;;;;;;;;;;;cfs.call(el);
;;;;;;;;;;;;}
;;;;;;;;}
;
;;;;</script>
;</html>
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,DT_SetAutoSizeControls(hDlg "3s")
,max hDlg
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Click the full screen button, it can not display the full screen of the webpage, but directly open the HTML file with IE browser, click the button is full screen
The following web page file can be opened normally in Internet Explorer 11. I can also click the full screen button to make the web page full screen display.