易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript通用Alert美化类

function sAlert(msg,boxtype,func,msgtitle)
sAlert('信息内容',1,'','信息标题') 
@msg:提示信息内容 
@boxtype:1为弹出框,2为确认框,3为提示框 
@func:点确认时执行的函数 
@title:信息框标题文字内容 
只有msg是必须的,后面的参数可以省略。如果中间的参数为空则在对应位置上''或者""表示(根据实际情况选择单双引号) 
调用此方法须在每个使用的页面的head区域加入下面代码。
 <mce:script type="text/javascript" src="alert1/alert.js" mce_src="alert1/alert.js"></mce:script>
<link href="alert1/alert.css" mce_href="alert1/alert.css" rel="stylesheet" type="text/css" />

运行效果如下:

<!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>
<title>弹出框测试页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />

<mce:style type="text/css"><!--
/*<!--[CDATA[*/
*{
margin:0;padding:0;
}
ul li{list-style-type:none;}
html,body{height:100%;}
#textid{padding:10px}
#bgDiv{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;
filter:alpha(opacity:75);opacity:0.6;}
#msgDiv{text-align:center;position:absolute;left:50%;top:50%;line-height:25px;z-index:101;
padding:1px 0 25px;font-size:12px;height:auto!important;height:142px;min-height:142px;
width:255px;background:url(attachments/month_0904/g200942816344.gif) left top repeat-y;}
#msgTxt{clear:both;padding:10px 10px;text-align:left;}
#msgTxt li{border-bottom:1px dotted #69a;}
#msgTitle{font-size:12px;margin:0;height:21px;width:100%;line-height:20px;text-indent:3em;
background:url(attachments/month_0904/n200942816339.gif) left top no-repeat;text-alig


相关文档:

Javascript中Event属性和方法

 Event属性和方法:
1. type:事件的类型,如onlick中的click;
2. srcElement/target:事件源,就是发生事件的元素;
3. button:声明被按下的鼠标键,整数,1代表左键,2代表右键,4代表中键,如果按下多个键,酒把这些值加起来,所以3就代表左右键同时按下;(firefox中 0代表左键,1代表中间键,2代表右键) ......

怎样对.net中的javascript脚本进行调试?

第一步:在IE的“Internet设置”中选择“高级”——“安全”——“启用集成windows身份验证”。
第二步:在需要调试的页面的脚本中加上debugger; 然后运行这个页面,就会在这里停下来
例如:
function BtnSubmit_Click()
{
var aaa;
aaa='aaa';
debugg ......

一个css javascript的二级横向菜单

  演示地址: http://www.wowo-design.com/view/51_01/index.htm
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css菜单演示</title>
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
  ......

javascript typeof的用法

 
经常会在js里用到数组,比如 多个名字相同的input, 若是动态生成的, 提交时就需要判断其是否是数组.
if(document.mylist.length != "undefined" ) {} 这个用法有误.
正确的是 if( typeof(document.mylist.length) != "undefined" ) {}
或 if( !isNaN(document.mylist.length) ) {}
typeof ......

JavaScript调用swf中函数

The ExternalInterface API
        之前我们使用flash调用javascript函数,一般使用这样的方法:
代码:
getURL(“javascript:alert(‘hello zhang-chao.com’);”); //注意字符串 双引号 里面加单引号
但是使用这种方法从flash调用javascript函数仍存在许多困难 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号