js jquery 验证写法
<?php
header("Content-type: text/html; charset=utf-8");
?>
<script src="jquery.min.js"></script>
<form action="">
<input type="text" name="user_name">
<span></span>
</form> <script>
$("input[name=user_name]").focus(function()
{
$("input[name=user_name]~span").html("请输入4-6位号码");
}).blur(function()
{
/*这里做一个函数检测*/
$("input[name=user_name]~span").html("输入正解");
});
</script> <script>
Javascript 返回上一页: 1. history.go(-1), 返回两个页面: history.go(-2); 2. history.back(). 3. window.history.forward()返回下一页 4. window.history.go(返回第几页,也可以使用访问过的URL) 例: <a href="javascript:history.go(-1);">向上一页</a> response.Write("<script language=javascript>")
response.Write("if(!confirm('完成任务?')){history.back();}")
response.Write("</script>")
response.Write("<script language=javascript>history.go(-1);</script>")
<a href="javascript:history.go(-1);">向上一页</a>
页面跳转: P.S.
小技巧(JS引用JS): <script type=text/javascript>
<!--
if (typeof SWFObject == "undefined") {
document.write('<scr' + 'ipt type="text/javascript" src="/scripts/swfobject-1.5.js"></scr' + 'ipt>');}
//-->
</script>
js jquery 验证写法的更多相关文章
- js&jquery验证邮箱和手机号是否正确范例
实现源码: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ...
- js jquery验证上传文件的格式和大小
// 验证附件格式和大小 function confirmData() { var flag = true; var message = ""; var errorSize = & ...
- jQuery验证控件jquery.validate.js使用说明
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 转载 ...
- jQuery插件 -- 表单验证插件jquery.validate.js, jquery.metadata.js
原文地址:http://blog.csdn.net/zzq58157383/article/details/7718352 最常使用JavaScript的场合就是表单的验证,而jQuery作为一个 ...
- (转)jQuery验证控件jquery.validate.js使用说明+中文API
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 转载 ...
- jquery.validate.js 一个jQuery验证格式控件
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 转载 ...
- jQuery验证控件jquery.validate.js的使用介绍
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 转载 ...
- jQuery验证控件jquery.validate.js使用说明+中文API(转)
一导入js库<script src="../js/jquery.js" type="text/javascript"></script> ...
- jQuery验证控件jquery.validate.js使用说明+中文API
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 学习 ...
随机推荐
- [RxJS] Starting a Stream with SwitchMap & switchMapTo
From an event map to another event we can use switchMap(), switchMap() accept an function which retu ...
- 在Ubuntu上下载、编译和安装Android最新源代码
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6559955 看完了前面说的几本书之后,对Lin ...
- NFinal学习笔记(一)
NFinal框架,最快的netWeb框架,其有三大特色,NFinalServer,NFinalBuild,NFinal代码生成器(生成web层) 首先学习了NFinalServer. NFinalSe ...
- Code First 数据注释--InverseProperty 和 ForeignKey
ForeignKey 按照约定在Post类中看到BlogId属性,会认为是Blog类的外键,但是在Blog类中并没有BlogId属性,解决方法是,在 Post 中创建一个导航属性,并使用 Foreig ...
- easyui treeJson 带层数
public string GetTreeNav(int ID,int Num) { StringBuilder sb = new StringBuilder(); sb.Append("[ ...
- Java数据结构漫谈-LinkedList
同样是List的数据结构,LinkedList是使用了前后指针,指明节点的方式来表示链表的,这与之前介绍的ArrayList http://www.cnblogs.com/yakovchang/p/j ...
- seajs模块压缩问题
在优化整理项目代码时,想使用seajs来把代码模块化.看了下官方5分钟上手教程,觉得很不错,也没多想就一直开发下去了,也没出什么问题.等一同事说把代码打包个放到设备上去测试一下,发现怎么也跑不起来,郁 ...
- [转]shell中 source命令即点空格后面再跟可执行文件的说明
这里记录的是在一个shell脚本里面使用. ./file.sh 和./file.sh 的区别,本文参考了http://www.lslnet.com/linux/dosc1/39/linux-28353 ...
- php 远程下载图片到本地
大家好,从今天开始,小弟开始写写博客,把自己在工作中碰到的问题的解决方法纪录下来,方便以后查找,也给予别人方便,小弟不才,第一次写博客,有什么不足之处请指出,谢谢! 今天纪录的是怎么通过PHP远程把图 ...
- 判断display为隐藏还是显示及获取css
<html lang="en"> <head> <title>判断display为隐藏还是显示及获取css</title> < ...