没有合适的资源?快使用搜索试试~ 我知道了~
js正则表达式笔记,直接运行
需积分: 10 4 下载量 111 浏览量
2011-02-22
14:43:14
上传
评论
收藏 6KB TXT 举报
温馨提示
试读
8页
js正则表达式笔记,可以运行,正则 笔记
资源推荐
资源详情
资源评论
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'RegExpTest.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body class="">
<script type="text/javascript">
function messageWindow(title, msg)
{
var width="300", height="125";
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'RegExpTest.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body class="">
<script type="text/javascript">
function messageWindow(title, msg)
{
var width="300", height="125";
var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
var msgWindow = window.open("","msgWindow", styleStr);
var head = '<head><title>'+title+'</title></head>';
var body = '<center>'+msg+'<br><p><form><input type="button" value=" Done " onClick="self.close()"></form>';
msgWindow.document.write(head + body);
}
</script>
<script type="text/javascript">
//RegExp 函数:test();exec()
//StringObj 函数:match();replace();split()
//函数test() 测试
//* 零次或多次 (为空可以通过)
//+ 一次或多次
//?零次或一次
//数字字母效验
function testRegExp(){
var regexp = new RegExp(/^[0-9a-zA-Z]+$/);
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
var msgWindow = window.open("","msgWindow", styleStr);
var head = '<head><title>'+title+'</title></head>';
var body = '<center>'+msg+'<br><p><form><input type="button" value=" Done " onClick="self.close()"></form>';
msgWindow.document.write(head + body);
}
</script>
<script type="text/javascript">
//RegExp 函数:test();exec()
//StringObj 函数:match();replace();split()
//函数test() 测试
//* 零次或多次 (为空可以通过)
//+ 一次或多次
//?零次或一次
//数字字母效验
function testRegExp(){
var regexp = new RegExp(/^[0-9a-zA-Z]+$/);
剩余7页未读,继续阅读
资源评论
xnekin
- 粉丝: 3
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功