- 博客(16)
- 收藏
- 关注
原创 反射
package com.luntan.test;建立一个Person的类public class Person {private String name;private int age;public String getName() {return name;}public void setName(String name) {this.name = n
2016-06-13 09:06:50
282
原创 注册的时候 输入框类用户名 密码 邮箱的判定
注册 #selectCity{ height: 30px; width: 140px; } #selectArea{ height: 30px; width: 140px; }
2016-06-04 16:35:17
4532
原创 正则表达式 找邮箱
找邮箱 var num = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/ var semail = 'ming514671146@163.com'; alert(num.test(semail)) 能找出所有格式的邮箱
2016-06-04 16:34:06
640
原创 正则表达式 找手机号
正则表达式找手机号 // var num = /[1]{1}\d{10}/// var str = 'asd18208251890';// alert(num.exec(str)); var num1 = /[0]{1}\d{2}[^\d]\d{8}/ var ss = 'asd028-827345
2016-06-04 16:33:05
719
原创 用户名不能为空的验证
用户名不能为空的验证 function checkInfo(){ var userName = document.getElementById("txtName");//获取该元素 if(userName.value.trim()==""){ var findNodes = docu
2016-06-04 16:31:07
6017
原创 网页右下角弹出信息框
网页右下角弹信息框 #winpop { width: 200px; height: 0px; position: absolute; right: 0; bottom: 0; border: 1p
2016-06-04 16:29:50
1444
原创 页面评分操作
评分 window.onload=function(){ //获取所有图片的元素对象 var obj = document.getElementsByTagName("img"); //读取数组的索引 for(var i=0;i /
2016-06-04 16:28:57
681
原创 级联操作
级联操作 #selectCity{ height: 30px; width: 140px; } #selectArea{ height: 30px; width: 140px; }
2016-06-04 16:27:45
347
原创 checkbox选中之后 才能点击按钮
注册 function check(){ var checkbox = document.getElementById("ch");//选中checkbox的id; if(checkbox.checked==true){//按钮已选中 document.getElementById(
2016-06-04 16:26:35
7309
4
原创 表格的处理
表格 var highlightcolor = 'red';//鼠标移上去的颜色 var clickcolor = '#51b2f6';//单元格原来的颜色 function changeto() { //首先获取点击的对象 var source; if(
2016-06-04 16:25:09
341
原创 按钮的可用状态
按钮的可用状态 var a = 10;//定义一个时间 10秒 window.onload=function(){//加载subtime()方法 subtime() } function subtime(){ if(a > 0){//时间大于0
2016-06-04 16:24:00
364
原创 隐藏图片和显示图片替换图片
隐藏图片和显示图片替换图片 function yincang(){ var divdom=document.getElementById("a"); divdom.style.display="none"; } function xianshi(){ va
2016-06-04 15:32:32
722
原创 图片的放大和缩小
图片放大和缩小 var width=img1.width; var height=img1.height; function da(){ if(img1.height img1.height=img1.height+20; img1.wid
2016-06-04 15:30:52
411
原创 单击按钮替换内容
单击按钮替换内容 function danji(){ var divdom = document.getElementById("a"); divdom.innerHTML="这是span内容" divdom.style.backgroundColor="green"; }
2016-06-04 15:29:01
1946
原创 定时器
通过定时器显示当前时间 var s; window.onload=function(){ s = window.setInterval("shijian()",1000) } function shijian(){ var sdom = document.getE
2016-06-04 15:27:38
217
原创 10秒后显示图片
10秒后显示图片 window.onload=function(){ window.setTimeout("xianshi()",10000); } function xianshi(){ document.getElementById("imgs").style.display=
2016-06-04 15:24:04
421
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人