随笔分类 -  JavaScrpt

不间断滚动实例(兼容各浏览器)
摘要:转:http://lsls0116.blog.163.com/blog/static/3500679120112309226976/<script language="javascript"><!--/*MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类) Ver 1.65*\ 制作时间:2006-08-29 (Ver 0.5) 发布时间:2006-08-31 (Ver 0.8) 更新时间:2007-12-28 (Ver 1.65) 更新说明: + 加入功能 * 修正、完善 1.65.071228 * 横向、纵向滚动格 阅读全文
posted @ 2013-05-22 08:47 雨季 阅读(500) 评论(0) 推荐(0)
JS限制文本框录入长度(支持字符限制)
摘要:转:http://blog.csdn.net/civerb/article/details/4772007功能/特点:1.实时显示可输入的字数(字节数)2.两种限制方式(长度、字节数)3.中文输入法下可正常使用,无BUG4.同一页面可以使用多个,相互不干扰limit.jsfunction limit(){ var txtNote;//文本框 var txtLimit;//提示字数的input var limitCount;//限制的字数 var isbyte;//是否使用字节长度限制(1汉字=2字符) var txtlength;//到达限制时... 阅读全文
posted @ 2013-03-21 10:43 雨季 阅读(1773) 评论(0) 推荐(0)
window.open不被拦截
摘要:某页面中button按钮事件写代码如下:string Str1="http://www.sohu.com/";Response.Write("<script>window.open('" + Str1 + "','_blank');window.showModalDialog('close.htm');</script>");close.htm文件 代码为<html><body onload="window.parent.opener= 阅读全文
posted @ 2011-11-07 11:33 雨季 阅读(264) 评论(0) 推荐(0)
三级菜单更新,修改一些错误
摘要:css: <styletype="text/css">*{margin:0;padding:0;border:0;}body{font-family:arial,宋体,serif;font-size:12px;}.navRoot{list-style-type:none;background:#666;height:30px;}.navRootli{position:relative;height:30px;line-height:30px;}.navRootlia:link,.navRootlia:visited{display:block;text-deco 阅读全文
posted @ 2011-07-14 15:49 雨季 阅读(272) 评论(0) 推荐(0)
UL下拉菜单(三级),可遮挡ActiveX等高显示优先级元素
摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><styletype="text/css">* 阅读全文
posted @ 2011-04-28 13:05 雨季 阅读(873) 评论(0) 推荐(0)
ajax使用json跨域
摘要:转:http://bbs.chinaunix.net/viewthread.php?tid=988681用json和script标签,解决ajax的跨域问题 ajax的XMLHttpRequest因为js的安全问题是不能跨域的 但是<script></script>可以用src="http://otherSite.com/a.js"可以跨域 所以动态写入一个<script></script>就OK了 scr指向一个其它站点的文件,比如:a.php?id=15 让a.phpecho()一个json的字符串 json参考:[url 阅读全文
posted @ 2011-04-08 16:11 雨季 阅读(399) 评论(0) 推荐(0)
JS UL下拉菜单
摘要:<!DOCTYPEhtmlPUBliC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"lang="zh-CN"><head><metahttp-equiv="Content-Type"content="text/html;c 阅读全文
posted @ 2011-03-29 12:42 雨季 阅读(418) 评论(0) 推荐(0)
JS模拟各种风格的alert提示框
摘要:参考:http://www.cnblogs.com/cloudgamer/archive/2010/10/11/AlertBox.html 阅读全文
posted @ 2010-12-13 09:34 雨季 阅读(381) 评论(0) 推荐(0)
支持时间选择的梅花雨日历控件
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!--/**本日历选择控件由“丁伟峰”(ddwwff@gmail.com)于2008.11.14,根据梅花雨日期控件,和前人经验完善而得。*修改的源码来源于“... 阅读全文
posted @ 2010-12-03 09:32 雨季 阅读(802) 评论(1) 推荐(0)
dojo事件传递自定义参数
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--varexampleClass=function(){this.counter;this.sum=function(num1,num2){varresult=num1+num2;//计算结果resul... 阅读全文
posted @ 2010-11-29 09:21 雨季 阅读(398) 评论(0) 推荐(0)
dojo中自定义事件
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--varexampleClass=function(){this.counter;this.event1=function(){this.counter++;};this.event2=function... 阅读全文
posted @ 2010-11-16 16:15 雨季 阅读(300) 评论(0) 推荐(0)
使用dsoframer实现Web页面编辑excel功能
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="WebExcel.aspx.cs"Inherits="WebExcel"%><... 阅读全文
posted @ 2010-08-25 11:51 雨季
页面滚动到指定控件
摘要:页面滚动到指定控件obj.scrollIntoView(); 阅读全文
posted @ 2010-08-10 11:42 雨季 阅读(209) 评论(0) 推荐(0)
Asp.Net中控制TreeView中CheckBox的JS脚本
摘要:[代码]调用方式:例:treeCategory为TreeView的ID号this.treeCategory.Attributes.Add("onclick", "OnTreeNodeChecked('"+treeCategory.ClientID+"');"); 阅读全文
posted @ 2009-07-21 17:16 雨季 阅读(466) 评论(0) 推荐(0)
CSS防止表格/DIV撑破
摘要:防止英文单词被打断:word-break:keep-all; 溢出显示省略号:text-overflow:ellipsis; 空格不换行:white-space:nowrap; Historical coal &amp; coke data and future forecasts 阅读全文
posted @ 2009-05-05 10:23 雨季 阅读(476) 评论(0) 推荐(0)
JavaScript操纵Cookie
摘要: 阅读全文
posted @ 2009-05-05 10:22 雨季 阅读(227) 评论(0) 推荐(0)
JavaScript验证日期
摘要:function ChkData(str) { var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); if(r==null) return false; var d= new Date(r[1], r[3]-1, r[4]); retu... 阅读全文
posted @ 2009-05-05 10:21 雨季 阅读(265) 评论(0) 推荐(0)
JavaScript连续横向滚动
摘要:横向滚动图片 1 2 3 4 5 6 7 8 9 阅读全文
posted @ 2009-05-05 10:21 雨季 阅读(1175) 评论(0) 推荐(0)
JavaScript去除空格函数
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } String.prot... 阅读全文
posted @ 2009-05-05 10:20 雨季 阅读(210) 评论(0) 推荐(0)
回车提交表单
摘要: 阅读全文
posted @ 2009-05-05 10:18 雨季 阅读(210) 评论(0) 推荐(0)