Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to insert html code into QM code and run function in JS code of the html
#1
I want to insert the html code into the QM code , so that QM can run the web page just by generating an exe file, but I don't know if it can be implemented.

In addition, when the web page is opened, the function fullScreen() in the JS code of the html can be automatically run, so that I can achieve full-screen display effect.

I hope someone can help me, any suggestions and comments are welcome, thanks in advance   Smile

html code: 

Code:
Copy      Help
<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>


Messages In This Thread
How to insert html code into QM code and run function in JS code of the html - by win - 05-18-2018, 01:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)