摘要: <div style=" border: 10px; border-style: solid; height: 100px; width: 200px; margin: auto; color: rgb(0, 255, 214); background-color: rgb(14, 196, 241);"></div>显示如下:其中:border-style缺少则border不显示。<div style=" border: 10px; height: 100px; width: 200px; margin: auto; c... 阅读全文
posted @ 2012-11-09 13:12 shuaizizhi 阅读(4297) 评论(0) 推荐(0) 编辑
摘要: 1,页面说明:5秒后页面自动跳转到百度。<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script type="text/javascript"> function countDown(secs,surl){ var jumpTo = document.getElementById('jumpTo'); jumpT 阅读全文
posted @ 2012-11-05 11:31 shuaizizhi 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 1,一个简单的表单验证JavaScript 可用来在数据被送往服务器前对 HTML 表单中的这些输入数据进行验证。<html><head><script type="text/javascript">function validate_email(field,alerttxt)//验证邮箱格式是否合法{with (field)//验证对象{apos=value.indexOf("@")dotpos=value.lastIndexOf(".")if (apos<1||dotpos-apos< 阅读全文
posted @ 2012-11-01 14:22 shuaizizhi 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1,创建cookie利用用户在提示框中输入的数据创建一个 JavaScript Cookie,当该用户再次访问该页面时,根据 cookie 中的信息发出欢迎信息。<html><head><script type="text/javascript">//读取cookie标签对应值//c_name:cookie标签function getCookie(c_name){if (document.cookie.length>0)//cookie不为空{ c_start=document.cookie.indexOf(c_name + &qu 阅读全文
posted @ 2012-11-01 11:09 shuaizizhi 阅读(326) 评论(0) 推荐(0) 编辑