1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=1920,user-scalable=0">
- <title>双师教学标准平台</title>
- <link rel="stylesheet" href="../../lib/css/base.css" />
- </head>
- <body>
- <script>
- (function (doc, win) {
- //用原生方法获取用户设置的浏览器的字体大小(兼容ie)
- if (doc.documentElement.currentStyle) {
- var user_webset_font = doc.documentElement.currentStyle['fontSize'];
- }
- else {
- var user_webset_font = getComputedStyle(doc.documentElement, false)['fontSize'];
- }
- //取整后与默认16px的比例系数
- // var xs = parseFloat(user_webset_font) / 16;
- var docEl = doc.documentElement, //根元素html
- //判断窗口有没有orientationchange这个方法,有就赋值给一个变量,没有就返回resize方法。
- resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
- recalc = function () {
- var clientWidth = docEl.clientWidth;
- if (!clientWidth) return;
- if (clientWidth < 1920) {
- docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';
- } else {
- docEl.style.fontSize = 100 + 'px';
- }
- };
- if (!doc.addEventListener) return;
- win.addEventListener(resizeEvt, recalc, false); //addEventListener事件方法接受三个参数:第一个是事件名称比如点击事件onclick,第二个是要执行的函数,第三个是布尔值
- doc.addEventListener('DOMContentLoaded', recalc, false) //绑定浏览器缩放与加载时间
- })(document, window);
- </script>
- <script>
- function setAndroidEvent(type, keyCode) {
- var leaf = FocusEngine.getFocusedLeaf();
- var eid = document.getElementById(leaf.id);
- var evt = document.createEvent('Event');
- evt.initEvent(type, true, true);
- evt.keyCode = keyCode;
- eid.dispatchEvent(evt);
- }
- </script>
- <!-- <script src="../../lib/js/alitv-debug.min.js"></script> -->
- <script src="../../lib/js/FocusEngine.js"></script>
- <script src="../../lib/js/blitz.js"></script>
- <script src="../../lib/js/moye.min.js"></script>
- <script src="../../lib/js/TVUtil.min.js"></script>
- <script src="../../lib/js/core.min.js"></script>
- <script src="../../lib/js/sha1.min.js"></script>
- <script src="../../lib/js/md5.min.js"></script>
- <script src="../../lib/js/ckplayer/hls.min.js"></script>
- <script src="../../lib/js/ckplayer/ckplayer.js"></script>
- <script>
- var ts = '201807251125';
- var appCss = document.createElement('link');
- appCss.rel = 'stylesheet';
- appCss.href = './index.css?t=' + ts;
- document.head.appendChild(appCss);
- var appScript = document.createElement('script');
- appScript.src = './index.js?t=' + ts;
- document.body.appendChild(appScript);
- </script>
- <script>
- //定义一个全局变量用于记录使用时间
- var globalUseDurationRecord = 0;
- setInterval('globalUseDurationRecord += 1', 1000);
- </script>
- <script>
- //解决startsWith、endsWith在webview上不能使用问题
- String.prototype.startsWith=function(str){
- var reg=new RegExp("^"+str);
- return reg.test(this);
- }
- String.prototype.endsWith=function(str){
- var reg=new RegExp(str+"$");
- return reg.test(this);
- }
- </script>
- </body>
- </html>
|