| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /www/data/wwwroot/2026_01_30_02/skin/js/ |
Upload File : |
//获取窗口宽度
function getWindowWidth() {
var windowWidth = 0;
if (typeof (window.innerWidth) == 'number') {
windowWidth = window.innerWidth;
}
else {
if (document.documentElement && document.documentElement.clientWidth) {
windowWidth = document.documentElement.clientWidth;
}
else {
if (document.body && document.body.clientWidth) {
windowWidth = document.body.clientWidth;
}
}
}
return windowWidth;
}
if(phone()||isWeiXin()){
var VideoIframeObj = document.getElementsByName("myvideo");
if (VideoIframeObj.length > 0) {
for (var i = 0; i < VideoIframeObj.length; i++) {
var _ddWidth = parseInt(getWindowWidth() * 90 / 100);
var _dheight = 180;
if (_ddWidth > 0) {
_dheight = parseInt(9 * _ddWidth/16)
}
VideoIframeObj[i].style = "width:" + _ddWidth + "px;height:" + _dheight + "px;";
VideoIframeObj[i].height = _dheight;
VideoIframeObj[i].width = _ddWidth;
var videosrc = VideoIframeObj[i].src;
var reger = new RegExp("&width=\\d+", "gmi");
videosrc = videosrc.replace(reger, "&width=" + _ddWidth);
reger = new RegExp("&height=\\d+", "gmi");
videosrc = videosrc.replace(reger, "&height=" + _dheight);
VideoIframeObj[i].src = videosrc;
}
}
}
function phone(){
if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
// console.log('移动端');
return true;
} else {
// console.log('pc端');
return false;
}
}
function isWeiXin(){
var ua = window.navigator.userAgent.toLowerCase(); // 该属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息
//通过正则表达式匹配ua中是否含有MicroMessenger字符串
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
return true;
}else{
return false;
}
}