JavaScript
Cookie's
aaaaaaa
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
JS window对象指定大小页面
无标题文档function openwindow(){ if(window.screen.width == 1024 && window.screen.height == 768){ open("register.html","注册窗口","toolbars = 0,location=0,statusbars=0,menubars=0,width=700,height=550,scrol原创 2015-09-21 17:09:53 · 1099 阅读 · 0 评论 -
JS动态显示时间
无标题文档function disptime(){ var time = new Date(); //获得当前时间 var hour = time.getHours(); var minute = time.getMinutes(); var second = time.getSeconds(); document.myForm.myclock.value = time.ge原创 2015-09-23 15:17:14 · 1273 阅读 · 0 评论 -
JS显示时间
无标题文档function disptime(){ var now = new Date(); var hour = now.getHours(); if(hour>=0 && hour<=12){ document.write("上午好!"); } if(hour >12 && hour <=18){ document.write("下午好!"); } if(hou原创 2015-09-23 13:40:41 · 472 阅读 · 0 评论 -
JS打开模式对话框
无标题文档 function openwindow(){ window.status="系统当前状态:您正在注册用户......"; if(window.screen.width == 1024 && window.screen.height == 768){ window.showModalDialog("register.html","注册窗口","toolbars=0,lo原创 2015-09-23 10:19:08 · 858 阅读 · 0 评论 -
JS有参函数的创建和调用
无标题文档.textBaroder{ border-width:1px; border-style:solid;}function compute(op){ var num1,num2; num1 = parseFloat(document.myForm.txtNum1.value); num2 = parseFloat(document.myForm.txtNum2.va原创 2015-09-21 15:16:40 · 749 阅读 · 0 评论 -
JS window对象默认窗口
无标题文档function openwindow(){ window.status="系统当前状态:您正在注册用户……"; if(window.screen.width == 1024 && window.screen.height == 768){ window.open("register.html"); } else{ window.alert("请设置分辨率为10原创 2015-09-21 16:58:00 · 894 阅读 · 0 评论 -
JS 基本语法应用
function calcu(){ var numb1 = document.calc.num1.value; var numb2 = document.calc.num2.value; var total = parseFloat(numb1)*parseFloat(numb2); document.calc.result.value=total; }无标题文档原创 2015-09-21 14:53:28 · 591 阅读 · 0 评论 -
JS显示循环输出的文字
无标题文档 function showHello(){ var count = document.myForm.txtCount.value; for(i=0;i<count;i++){ document.write("HelloCookie"); } } 输入HelloCookie的次数原创 2015-09-21 14:56:19 · 3008 阅读 · 0 评论 -
JS演示循环语句的用法
无标题文档 document.write("打印倒金字塔直线"); var i=25; while (i>0) { document.write(""); i=i-5; } for(var j=5;j<30;j=j+5) document.write("");原创 2015-09-21 14:54:56 · 706 阅读 · 0 评论 -
JS自动弹出广告窗口
无标题文档 function openwindow(){ open("adv.htm","广告页面","toolbars=0,scrollbars=0,location=0,statusbars=0,menubars=0,resizable=0,width=700,height=250"); }原创 2015-09-23 10:17:35 · 5866 阅读 · 0 评论
分享