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

Javascript弹出对话框3种方式

<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>三种弹出对话框的用法实例</title>
<script language=javascript >
     function ale()
    {
        //这个基本没有什么说的,就是弹出一个提醒的对话框
        alert("我敢保证,贾鹏你现在用的是演示一:提醒对话框");
    }
     function firm()
    {
        //利用对话框返回的值(true 或者 false)
        if(confirm("你确信要转去贾鹏的博客?"))
        {//如果是true ,那么就把页面转向ttp://hi.baidu.com/jiapeng8624237
         location.href="http://hi.baidu.com/jiapeng8624237";
        }
        else
        {
        //否则说明下了,吼吼……
         alert("你按了取消,那就是返回false");
        }
    }
   
     function prom()
    {
        var name=prompt("请输入您的名字","YoungBaby提醒您在这里输入您的名字");//将输入的内容赋给变量 name ,
        //这里需要注意的是,prompt有两个参数,前面是提示的话,后面是当对话框出来后,在对话框里的默认值
        if(name)//如果返回的有内容
        {
  &nb


相关文档:

javascript中event.keycode

javascript中event.keycode
 keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
keycode 32 = space space ......

Javascript导出Excel

<!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>
<meta http-equiv="Content-Type" content="text/html; ......

javascript常用

calcu()  ----函数实现两个数相乘
document.write();  ---打印
document.calc.元素名.value;  --获得表单的值
document.表单名。表单元素名。value  为表单赋值
定义函数:
 function  名字()
 {
    //javaScript预语句
 }
 onClick="函数名";  ......

[翻译]High Performance JavaScript(003)

Dynamic Script Elements  动态脚本元素
    The Document Object Model (DOM) allows you to dynamically create almost any part of an HTML document using JavaScript. At its root, the <script> element isn't any different than any other element on a page: references can be retrie ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号