网页里的两个js冲突怎么解决

weixin_38708163 2017-05-09 09:53:00
第一个js

function openpopup(){
window.open("lxyz1.html","","width=600,height=311")
window.open

("http://10.78.75.26/ZhiGong/LieCheZhangPaiKa_ZeRenQueRen.aspx","","width=750,height=400,top=0,left=0,resizable=yes,screenX=0,screenY=0,alwaysRaised=yes,scro

llbars=yes")
//window.open("heka.html","","width=450,height=443")
window.open

("http://10.78.75.26/ZhongDianWenTi/XiXi_WeiChuLi.aspx","","width=700,height=350,top=100,left=0,resizable=yes,screenX=0,screenY=0,alwaysRaised=yes,scrollbars

=yes")
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadpopup(){
if (get_cookie('popped')==''){
openpopup()
document.cookie="popped=yes"
}
}

第二个js
function setTab(name,cursel){
cursel_0=cursel;
for(var i=1; i<=links_len; i++){
var menu = document.getElementById(name+i);
var menudiv = document.getElementById("con_"+name+"_"+i);
if(i==cursel){
menu.className="off";
menudiv.style.display="block";
}
else{
menu.className="";
menudiv.style.display="none";
}
}
}
function Next(){
cursel_0++;
if (cursel_0>links_len)cursel_0=1
setTab(name_0,cursel_0);
}
var name_0='one';
var cursel_0=1;
var ScrollTime=99999999999999999;
var links_len,iIntervalId;
onload=function(){
var links = document.getElementById("tab1").getElementsByTagName('li')
links_len=links.length;
for(var i=0; i<links_len; i++){
links[i].onmouseover=function(){
clearInterval(iIntervalId);
this.onmouseout=function(){
iIntervalId = setInterval(Next,ScrollTime);;
}
}
}
document.getElementById("con_"+name_0+"_"+links_len).parentNode.onmouseover=function(){
clearInterval(iIntervalId);
this.onmouseout=function(){
iIntervalId = setInterval(Next,ScrollTime);;
}
}
setTab(name_0,cursel_0);
iIntervalId = setInterval(Next,ScrollTime);
}
...全文
1170 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
一笑拔剑 2017-05-10
  • 打赏
  • 举报
回复
JS和VB什么关系?> 何况这个是服务器端文件的问题 你客户端解决?
赵4老师 2017-05-09
  • 打赏
  • 举报
回复
使用两个浏览器。

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧