Category Archives: javascript

jquery validate addmethod包含ajax的问题

给jquery.validate.js添加自定义方法的时候需要到服务器进行验证, 结果验证时返回数据永远是false,而服务器返回数据是正确的,  google了下原来需要对ajax进行同步设置, jquery.validate添加新验证方法的代码片段如下:

Posted in javascript | Tagged , | Leave a comment

jquery thickbox 表单提交局部刷新

需求: 商城产品页面添加快速购买通道 效果: 点击快速购买出现订单填写对话框, 方便快速购买当前产品 实现: javascript ( jquery , thickbox) + php (codeigniter) 问题: thickbox表单提交造成页面刷新 解决方法: 取消submit的提交事件,改用ajax提交数据并返回结果进行局部刷新 代码如下:(仅供参考)

Posted in javascript | Tagged , | Leave a comment

jquery MulTabbed

jquery实现的在一个页面使用多个tabbed的效果的简单实现的插件 效果图: 演示地址: http://www.heui.org/wp-content/uploads/2010/12/jquery.MulTabbed.html 使用方法: 1.包含jquery以及Multabbed插件 2.然后在head标签内添加以下JavaScript代码 3.添加html到你的页面像下面一样 4.添加类似css 下载地址:jquery.MulTabbed

Posted in javascript | Tagged | 1 Comment

ie6 javascript 缺少标识符、字符串或数字

代码在火狐、ie8下都没问题,而在ie6下出现 缺少标识符、字符串或数字 的错误 结果发现js下用到json格式的数据,最后一个条目不能加逗号 js代码如下:

Posted in javascript | Tagged , | Leave a comment

常见的(Wysiwyg – 所见即所得)web编辑器

Wysiwyg – 所见即所得 是 What You See Is What You Get 的首字母缩略词。 CKEditor http://ckeditor.com/ FCKeditor http://www.fckeditor.net/ jWYSIWYG http://code.google.com/p/jwysiwyg/ markItUp http://markitup.jaysalvat.com/ NicEdit http://nicedit.com/ openWYSIWYG http://www.openwebware.com/ TinyMCE http://tinymce.moxiecode.com/ Whizzywig http://www.unverse.net/ WYMeditor http://www.wymeditor.org/ YUI editor http://developer.yahoo.com/yui/editor/

Posted in javascript | Leave a comment