您现在的位置: 圆点视线 >> 教程 >> 网页设计 >> javascript技巧 >> 文章正文
[图文]JS实现仿新浪信息提示效果           ★★★
JS实现仿新浪信息提示效果
作者:中国教程…  文章来源:中国教程网  点击数:  更新时间:2007-8-27 17:19:06 
 页面功能:【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口 【字体:

<!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" xml:lang="zh-CN" lang="zh-CN"> 
 <head> 
  <meta name="verify-v1" content="P4T6fFCiPVxqMWZ2eztyXVzMHlnwD0wLQOq6LBHN5Y8=" /> 
  <title>政策文件_中国电力工程造价信息网</title> 
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
  <meta http-equiv="Content-Language" content="gb2312" /> 
  <meta name="KeyWords" content="电力工程造价,价格信息,装材,设备,电力工程" /> 
  <meta name="description" content="电力工程造价信息" /> 
  <style type="text/css"> 
      *{ 
          margin:0;padding:0; 
      } 
  </style> 
 </head> 
 <body> 
  
 <div class="cecmbody" id="cecmpolicy"> 
  <div class="leftClass"> 
  <a href=http://www.webjx.com>网页教学网</a> 
  <input type="button" value="点击这里" onclick="sAlert(’hello’);" /> 
  </div> 
  <div class="rightClass"> 
  </div>  
 </div> 
    <script type="text/javascript" language="javascript"> 
//Author:Daviv 
//Blog:http://blog.163.com/jxdawei 
//Date:2006-10-27 
//Email:jxdawei@gmail.com 
   function sAlert(str){ 
   var msgw,msgh,bordercolor; 
   msgw=400;//提示窗口的宽度 
   msgh=100;//提示窗口的高度 
   titleheight=25 //提示窗口标题高度 
   bordercolor="#336699";//提示窗口的边框颜色 
   titlecolor="#99CCFF";//提示窗口的标题颜色 
    
   var sWidth,sHeight; 
   sWidth=document.body.offsetWidth; 
   sHeight=screen.height; 
   var bgObj=document.createElement("div"); 
   bgObj.setAttribute(’id’,’bgDiv’); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background="#777"; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
   bgObj.style.opacity="0.6"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000"; 

[1] [2] [3] 下一页

 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 文章录入:Rainsion    责任编辑:Rainsion  【字体:
 
  • 上一篇文章:

  •  
  • 下一篇文章:
  • 最新文章
    相关文章
    让广告代码不再影响你的网页加载速度
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    发表评论:
     姓  名: 评 分: 1分 2分 3分 4分 5分
     评论内容: ·严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
    ·用户需对自己在使用本网服务过程中的行为承担法律责任
    ·本站管理员有权保留或删除评论内容。
    ·评论内容只代表机友个人观点,与本网站立场无关。
     
    最 新 推 荐
     
    百度主题推广
    最 新 热 门