高手请帮忙 怎样加入关闭代码

来源:百度知道 编辑:UC知道 时间:2024/05/13 10:37:01
document.writeln("<!--随屏移动图片代码-->");
document.writeln("<style type=\"text\/css\">");
document.writeln("<!-- ");
document.writeln("body{font-size=9pt}");
document.writeln("TH{FONT-SIZE: 9pt}");
document.writeln("TD{ FONT-SIZE: 9pt}");
document.writeln("#floater {");
document.writeln("position: absolute;");
document.writeln("left: 400px;");
document.writeln("top: 600;");
document.writeln("width: 125;");
document.writeln("visibility: visible;");
document.writeln("z-index: 10;");
document.writeln("}");
document.writeln("-->");
document.writeln("<\/style>");
document.writeln("");
document.writeln("");
document.writeln("<script>");
document.writeln("va

代码太长 也就没细看,
个人感觉你应该是想设置一个按钮,点击该按钮则这个随屏移动的图片 关闭,不显示

给你个思路,首先找到显示图片的代码 在里面插入按钮,并设置 onclick="closeimg()"

这个方式是点击按钮调用js中closeimg()函数

然后编写这个函数

function closeimg(){
document.getElementById("图片的id").style.display="none";
}
此方式意思是将移动图片所在的位置隐藏,以达到关闭的效果