asp语言编写的图片漂浮代码是什么

gxwy89feixue 2011-05-08 05:48:03
如果有代码的请发给我一个,谢谢
...全文
170 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
lwdww 2011-05-19
  • 打赏
  • 举报
回复
怎么不结账啊
gxwy89feixue 2011-05-19
  • 打赏
  • 举报
回复
我的天哪,这么多谢谢了
孟子E章 2011-05-10
  • 打赏
  • 举报
回复
完整的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
//函数
var FloatContent = window.FloatContent || function () {
if (!window.Instances) {
window.Instances = {};
window.Instances.Get = function (i) {
return window.Instances[i];
}
}
var Instance = this;
this.Timer1 = null;
this.Speed = 10;
this.HtmlContent = "";
this.DivFloat = null;
this.Guid = ("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; return v.toString(16); }).toUpperCase());
//全局实例集合。
window.Instances[this.Guid] = this;

this.Start = function () {
var d = document.createElement("div");
d.style.position = "absolute";
d.style.backgroundColor = "red";
d.innerHTML = this.HtmlContent;
d.setAttribute("id", this.Guid);
if (d.addEventListener) {
d.addEventListener("mouseover", function () { Instance.Stop(); }, false);
d.addEventListener("mouseout", function () { Instance.ReStart(); }, false);
}
else {
d.attachEvent("onmouseover", function () { Instance.Stop(); });
d.attachEvent("onmouseout", function () { Instance.ReStart(); });
}
document.body.appendChild(d);
this.DivFloat = d;
Instance.ReStart();
}

this.ReStart = function () {
this.Timer1 = window.setInterval("window.Instances['" + this.Guid + "'].changePosition()", this.Speed);
}

this.Stop = function () { if (this.Timer1) window.clearInterval(this.Timer1); }

this.x = Math.ceil(Math.random() * 600), this.y = Math.ceil(Math.random() * 400);
this.xStep = 2, this.yStep = 2;
this.Direction = true; this.yDirection = true;

function getViewportWidth() {
var width = 0;
if (document.documentElement && document.documentElement.clientWidth) {
width = document.documentElement.clientWidth;
}
else if (document.body && document.body.clientWidth) {
width = document.body.clientWidth;
}
else if (window.innerWidth) {
width = window.innerWidth;
}
return width;
}

function getContentHeight() {
if (document.body && document.body.offsetHeight) {
return document.body.offsetHeight;
}
}

function getViewportHeight() {
var height = 0;
if (window.innerHeight) {
height = window.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight) {
height = document.documentElement.clientHeight;
}
else if (document.body && document.body.clientHeight) {
height = document.body.clientHeight;
}
else if (window.innerHeight) {
height = window.innerHeight;
}
return height;
}

function getViewportScrollX() {
var scrollX = 0;
if (document.documentElement && document.documentElement.scrollLeft) {
scrollX = document.documentElement.scrollLeft;
}
else if (document.body && document.body.scrollLeft) {
scrollX = document.body.scrollLeft;
}
else if (window.pageXOffset) {
scrollX = window.pageXOffset;
}
else if (window.scrollX) {
scrollX = window.scrollX;
}
return scrollX;
}

function getViewportScrollY() {
var scrollY = 0;
if (document.documentElement && document.documentElement.scrollTop) {
scrollY = document.documentElement.scrollTop;
}
else if (document.body && document.body.scrollTop) {
scrollY = document.body.scrollTop;
}
else if (window.pageYOffset) {
scrollY = window.pageYOffset;
}
else if (window.scrollY) {
scrollY = window.scrollY;
}
return scrollY;
}

function getViewportScrollHeight() {
var scrollH = 0;
if (document.documentElement && document.documentElement.scrollHeight) {
scrollH = document.documentElement.scrollHeight;
}
else {
scrollH = document.body.scrollHeight;
}
return scrollH;
}

this.changePosition = function () {
this.x = this.x + this.xStep * (this.xDirection ? 1 : -1);
this.y = this.y + this.yStep * (this.yDirection ? 1 : -1);

//若超出浏览器的宽度反向移动
if (this.x <= 0) this.xDirection = true;
if (this.x >= getViewportWidth() - this.DivFloat.offsetWidth) this.xDirection = false;

if (this.y <= 0) this.yDirection = true;
if (this.y >= getViewportHeight() - this.DivFloat.offsetHeight) this.yDirection = false;

//Div重新定位
this.DivFloat.style.top = this.y + getViewportScrollY() + "px";
this.DivFloat.style.left = this.x + getViewportScrollX() + "px";
}
}


</script>
</head>
<body>
<script language="javascript" type="text/javascript">
dd = new FloatContent();
dd.Speed = 50;
dd.HtmlContent = "<a href='http://dotnet.aspx.cc/'><img src='http://dotnet.aspx.cc/Images/logoSite.gif' border='0' /></a>";
dd.Start();

d2 = new FloatContent();
d2.Speed = 10;
d2.HtmlContent = "<a href='http://dotnet.aspx.cc/'><img src='http://dotnet.aspx.cc/Images/logoSite.gif' border='0' /></a>";
d2.Start();
</script>
</body>
</html>
PChelp 2011-05-10
  • 打赏
  • 举报
回复
调用JS代码呀.
PChelp 2011-05-10
  • 打赏
  • 举报
回复
调用JS代码就可以了呀.
PChelp 2011-05-10
  • 打赏
  • 举报
回复
调用JS代码
孟子E章 2011-05-08
  • 打赏
  • 举报
回复
这跟asp没有任何关系,asp是在服务器端运行的。
网奇CMS网站管理系统是由网奇公司开发的一套安全易用的CMS系统,本系统采用ASP.NET内核开发,本系统最大的特点是;后台管理功能强大,网站运行速度快,支持静态输出,网站安全性极高,对搜索引擎收录支持性好,24小时自动循环新闻采集,网站界面可任意定制各类精美页面.网奇CMS历时五年发展,现已达到非常成熟的网站管理系统。整套系统精雕细琢无一垃圾代码,使用过此系统的用户无不爱不释手;系统稳定、使用方便、运行速度快、模板丰富精美,现在全国各地已有上万家网站在使用本产品。     ================网奇CMS网站管理系统6.0百项功能一览==================== 1.使用全球通用的utf-8编码,符合国际标准 2.支持百万级的数据运行 3.提供系统统计信息,包括登陆记录,工作排行,运行状态,信息数目等 4.网站logo可在后台修改,栏目可设置单独logo 5.可设置关键字和描述,让搜索引擎更好的了解网站 6.栏目和内容均可填写seo标题,使优化更方便 7.提供RSS订阅功能,并可设置是否全文订阅 8.拥有用户整合接口,可实现跨站会员整合,如注册、修改、登陆、退出、删除、取资料 9.讨论区功能,可用作小型论坛,用户讨论等 10.留言本功能,可用作访客留言,在线解答等 11.友情链接功能,可设置分类,可区分图片链接和文字链接 12.可设置申请友情链接,并有审核友链功能 13.采用模板机制,可随意添加/修改/导入网站风格 14.提供几十种内置模板,栏目页/内容页可绑定不同模板 15.模板采用语义化编写代码精简,样式清晰 16.前台输出代码符合标准,兼容性强 17.可设置列表页显示内容数量 18.内容可设置倒序/正序显示 19.可自动提取第一张图片标题图片 20.标题图片,头条标题图片,幻灯片图片大小均可自定义设置 21.可为图片增加水印,尊重版权 22.下载功能,可上传软件 23.时间日期可自定义显示格式 24.可自动下载站外图片和flash 25.搜索可设置权限,如限会员搜索,只可搜索标题等 26.会员可审核注册,验证邮箱 27.后台可直接添加会员 28.会员可设置有效期 29.会员间拥有站内消息功能 30.会员/非会员可按栏目推荐新闻 31.会员拥有积分和虚拟货币功能 32.会员拥有会员组功能,新闻可限制会员组阅读 33.会员可通过QQ,sina等平台注册和登陆 34.管理系统分为系统管理员和新闻管理员 35.新闻管理员可按栏目分配添加/修改/审核权限 36.可设置GZIP压缩,提高网站速度 37.模拟静态,自定义后缀名 38.生成静态页面,并可定义生成速度 39.防盗链,保护网站流量 40.可设置上传文件格式,保护网站安全 41.网站/栏目可按IP限制/阻止访问 42.网站内置广告位,不同栏目可绑定不同的广告,并可一次更换整站广告 43.可切换简体/繁体,并可设置默认语言 44.支持语言包 45.网站内容评论功能,可设置是否审核/仅限会员等 46.对于智能手机访问网站用户,会直接跳转至触屏手机版本 47.手机版本采用模板机制,可按栏目绑定不同模板 48.手机版本可设置独立的logo和底部信息 49.手机版本采用html5编写,语义化代码 50.手机版本与网站数据通用 51.可备份数据库和文件 52.可以管理上传的文件 53.内容采集功能,采集规则可导入导出 54.采集支持多种网站编码,并可繁简转换 55.采集参数可自定义 56.可24小时无职守采集 57.可采集会员和数据库 58.可自动下载采集的站外图片 59.多个广告可按权重在广告位内随机显示 60.内置多种广告效果,如果漂浮,对联,背投等 61.广告可按js或iframe两种方式调用 62.可按栏目发布公告 63.有调查功能,新闻内可直接插入调查 64.代码插件,方便备案号,统计代码代码的后台填写 65.分类可实现无限级分类 66.分类可设置是否在导航显示 67.可以批量添加分类 68.分类可自定义静态目录 69.分类可以添加站外链接,链接到任意地址 70.分类可设置分类简介,便于模板制作 71.可拖动改变分类顺序 72.分类属性可批量维护 73.分类可以绑定自定义字段 74.分类可以添加rss地址,从而可以在网站显示任意提供rss的网站的最新内容 75.拥有新闻专题功能,添加内容的时候可同时选择所属专题 76.可根据标题关键字批量生成专题 77.单页功能,适用于关于我们,联系我们等页面 78.每个单页都是独立页面,可用修改模板的方法随意修改 79.单页拥有系统内置广告位 80.内

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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