这段JS代码 怎么加上超链接呢? 给这个“免费发布信息”加上超链接
varlastScrollY=0;functionheartBeat(){vardiffY=document.body.scrollTop;varpercent=.1*(...
var lastScrollY=0;
function heartBeat(){
var diffY=document.body.scrollTop;
var percent=.1*(diffY-lastScrollY);
if(percent>0){
percent=Math.ceil(percent);
}
else {
percent=Math.floor(percent);
}
document.getElementById("lovexin1").style.pixelTop+=percent;
document.getElementById("lovexin2").style.pixelTop+=percent;
lastScrollY+=percent;
}
function closeDiv(){
document.getElementById("lovexin1").style.display = "none";
document.getElementById("lovexin2").style.display = "none";
}
var suspendcode1="<DIV id=lovexin1 style='right:20px;POSITION:absolute;TOP:100px;'>免费发布信息<br>dfdsfsdf<div id='toClose' onclick='closeDiv()' align=center style='cursor:pointer'>关闭</div></div>"
var suspendcode2="<DIV id=lovexin2 style='left:20px;POSITION:absolute;TOP:100px'><img border=0 src='1.gif'><div id='toClose' onclick='closeDiv()' align=center style='cursor:pointer'>关闭</div></div>"
document.write(suspendcode1);
document.write(suspendcode2);
window.setInterval("heartBeat()",1); 展开
function heartBeat(){
var diffY=document.body.scrollTop;
var percent=.1*(diffY-lastScrollY);
if(percent>0){
percent=Math.ceil(percent);
}
else {
percent=Math.floor(percent);
}
document.getElementById("lovexin1").style.pixelTop+=percent;
document.getElementById("lovexin2").style.pixelTop+=percent;
lastScrollY+=percent;
}
function closeDiv(){
document.getElementById("lovexin1").style.display = "none";
document.getElementById("lovexin2").style.display = "none";
}
var suspendcode1="<DIV id=lovexin1 style='right:20px;POSITION:absolute;TOP:100px;'>免费发布信息<br>dfdsfsdf<div id='toClose' onclick='closeDiv()' align=center style='cursor:pointer'>关闭</div></div>"
var suspendcode2="<DIV id=lovexin2 style='left:20px;POSITION:absolute;TOP:100px'><img border=0 src='1.gif'><div id='toClose' onclick='closeDiv()' align=center style='cursor:pointer'>关闭</div></div>"
document.write(suspendcode1);
document.write(suspendcode2);
window.setInterval("heartBeat()",1); 展开
1个回答
展开全部
var suspendcode1="<DIV id=lovexin1 style='right:20px;POSITION:absolute;TOP:100px;'><a href='连接地址' target='_blank'>免费发布信息</a><br>dfdsfsdf<div id='toClose' onclick='closeDiv()' align=center style='cursor:pointer'>关闭</div></div>"
更多追问追答
追问
怎么在这段JS代码中加入一个FORM表单呢 能解决 继续追加分数
追答
你要加的表单项目有哪些?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询