用css样式和脚本js结合打开链接
来源:互联网 发布:mac文件拷贝到硬盘 编辑:程序博客网 时间:2024/04/28 01:24
//open window
function openWindow(openUrl, openName, openWidth, openHeight, openLeft, openTop){
var url = openUrl;
var name = openName;
var width = openWidth;
var height = openHeight;
var left = (String(openLeft) == "" ? (window.screen.availWidth-10-openWidth)/2 : openLeft);
var top = (String(openTop) == "" ? (window.screen.availHeight-40-openHeight)/2 : openTop);
window.open(url, name, "depended=yes,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
//To determine whether the download
var obj = event.srcElement ? event.srcElement : event.target;
if(!$(obj).attr("down_type")) {
//To determine whether the login
//It's the test value, please obtain the conditions of AJAX function, and then delete this line
open_type = $(this).attr("open_type");
switch(open_type){
case "pt":
if(checkGameState(2) && checkLogin()){
openWindow('/html/PTPage.html?gamecode=7bal', 'onlinept',1280,650,"",0);
}
break;
case "sport":
if(checkGameState(3)){
window.location.href="/html/sportbet.html";
}
break;
case "keno":
if(checkGameState(4) && checkLogin()){
openWindow("http://keno.gi899.com","onlinekeno",1280,650,"",0);
}
break;
case "slotgame":
if(checkGameState(2) && checkLogin()){
window.location.href="/html/slotgame.html";
}
break;
default:
return;
}
}
});
function openWindow(openUrl, openName, openWidth, openHeight, openLeft, openTop){
var url = openUrl;
var name = openName;
var width = openWidth;
var height = openHeight;
var left = (String(openLeft) == "" ? (window.screen.availWidth-10-openWidth)/2 : openLeft);
var top = (String(openTop) == "" ? (window.screen.availHeight-40-openHeight)/2 : openTop);
window.open(url, name, "depended=yes,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
}
//open game
$(".open_opus, .open_pt, .open_sport, .open_keno, .open_slotgame").click(function(event){//To determine whether the download
var obj = event.srcElement ? event.srcElement : event.target;
if(!$(obj).attr("down_type")) {
//To determine whether the login
//It's the test value, please obtain the conditions of AJAX function, and then delete this line
open_type = $(this).attr("open_type");
switch(open_type){
case "pt":
if(checkGameState(2) && checkLogin()){
openWindow('/html/PTPage.html?gamecode=7bal', 'onlinept',1280,650,"",0);
}
break;
case "sport":
if(checkGameState(3)){
window.location.href="/html/sportbet.html";
}
break;
case "keno":
if(checkGameState(4) && checkLogin()){
openWindow("http://keno.gi899.com","onlinekeno",1280,650,"",0);
}
break;
case "slotgame":
if(checkGameState(2) && checkLogin()){
window.location.href="/html/slotgame.html";
}
break;
default:
return;
}
}
});
0 0
- 用css样式和脚本js结合打开链接
- CSS和JS结合控制样式
- css链接和列表样式
- js脚本添加CSS样式引用
- 一些CSS样式和js
- js改变style样式和css样式
- js改变style样式和css样式
- js改变style样式和css样式
- ASP.NET动态引用样式表(css)和脚本(js)文件
- 轻松学习JavaScript二十六:DOM编程学习之动态添加JS脚本和CSS样式
- 轻松学习JavaScript二十六:DOM编程学习之动态添加JS脚本和CSS样式
- 利用JS脚本通过getAttribute()和setAttribute()等对CSS样式进行操作
- 用js改变css样式
- 用JS改变CSS样式
- 链接-JS设置CSS样式几种方式
- 用CSS指定外部链接的样式
- css不同链接样式
- CSS链接样式
- 实现简单的滑动悬停效果
- Swift的guard语句的用法
- NYOJ 20 吝啬的国度(邻接表、二维向量、队列、BFS、时间复杂度为O(n))
- javascript函数声明与函数表达式的区别:函数声明提升
- c++中构造函数初始化列表
- 用css样式和脚本js结合打开链接
- HDU 1870解题报告(愚人节的礼物)
- layout xml
- springMVC+ibatis 框架整合
- mysql 忘记root密码
- java框架设计_依赖
- myeclipse中的js文件报错
- 【Codeforces Beta Round 2B】【贪心 DP】The least round way 从(1,1)走到(n,n)乘积尾数0尽可能少
- hdu 2015新生赛 —— 游乐场