惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
爱范儿
爱范儿
Blog — PlanetScale
Blog — PlanetScale
The GitHub Blog
The GitHub Blog
C
Check Point Blog
小众软件
小众软件
I
InfoQ
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
酷 壳 – CoolShell
酷 壳 – CoolShell
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
腾讯CDC
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
雷峰网
雷峰网
B
Blog
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
D
Docker
博客园 - 司徒正美
博客园_首页
Recent Announcements
Recent Announcements
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
GbyAI
GbyAI
Jina AI
Jina AI
V
V2EX
Vercel News
Vercel News
IT之家
IT之家
WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
NISL@THU
NISL@THU
V
Visual Studio Blog
C
Cybersecurity and Infrastructure Security Agency CISA

博客园 - laolaowhn

Clean code that works (simplicity is more complicity than you think 朴素比你想象的更复杂) jQuery in Action 中文版 第一章 jQuery简介 如翻译的不好请原谅 jQuery in Action 中文版 简介 专用卸载工具 Windows Installer Clean Up Uninstall 临时表 中文转拼音源代码 ([^<]*) - laolaowhn - 博客园 IIS6架设网站常见问题及症状举例答疑 - laolaowhn - 博客园 jquery验证表单,可以独立与文框,利jquery动态控制,源代码 vs2005 js 没有反应 - laolaowhn {JS}JavaScript使用正则表达式 JavaScript下正则表达式密码强度验证 悟透JavaScript引子 prototype学习心得 prototype源码分析—enumerable Prototype 框架分析(一) Prototype.js的分析 我为什么选择mootools,抛弃了prototype. (mootools 与 prototype 核心代码分析) prototype源码分析
JavaScript 正则表达式 验证网址
laolaowhn · 2008-03-11 · via 博客园 - laolaowhn

<script   language= "javascript ">
function   IsUrl(str)
{
var   regUrl   =   /(http\:\/\/)?([\w.]+)(\/[\w-   \.\/\?%&=]*)?/gi;
var   result   =   str.match(regUrl);
if(result!=null)   {alert( "Yes ")}  
else   {alert( "No! ")}
}
</script>

<FORM   name= "bao ">
<INPUT   TYPE= "text "   NAME= "txt ">
<INPUT   TYPE=BUTTON   value= "TestURL "   onClick= "IsUrl(document.bao.txt.value) ">
</FORM>
(http\:\/\/)?代表匹配http://0或1次,
([\w.]+)匹配www.sian.com
\/[\w-   \.\/\?%&=]*)?匹配后面子串0或1次

posted @ 2008-03-11 08:26  laolaowhn  阅读(5591)  评论(4)    收藏  举报