![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
conkeyn
a
展开
-
Angularjs 1.x 中使用 layDate 日期控件
本文参照Angularjs 中使用 layDate 日期控件进行修改。laydate控件版本采用5.0.7,下载地址github。原版的package.json文件好像是有编码问题。需要将该文件转到utf-8格式的。 /** * 使用示例: * <p> * <ul> * <li> 基本日期选择:<in...原创 2017-10-18 11:30:13 · 1221 阅读 · 0 评论 -
javascript 源代码 混淆 js+packer.php
Javascript 的源代码混淆器。是使用php开发的。http://joliclic.free.fr/php/javascript-packer/en/index.php原创 2009-08-17 18:14:37 · 554 阅读 · 0 评论 -
JS实现不同域(Domain)之间的数据交换
http://blog.csdn.net/xymyeah/archive/2007/04/22/1575061.aspx 实现不同域(Domain)之间的数据交换引言前些天在对公司原有的 web应用进行改版时遇到一个问题,当时需要从原有的应用中提取出一部分,用一个更为通用的来进行替换,并且仍然保留原有的应用接口。原有的应用属于news.mycompany.com 域...原创 2009-08-11 08:38:50 · 1050 阅读 · 0 评论 -
设为首页JS,加入收藏夹js,加入收藏夹代码,设为首页代码,火狐和ie兼容
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><原创 2010-01-25 23:10:29 · 55 阅读 · 0 评论 -
添加,删除表单项
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><met2009-02-14 10:45:10 · 139 阅读 · 0 评论 -
<input>的name属性在IE6,IE7中是只读属性
<input>的name属性在IE6,IE7中是只读属性,只能使用以下方式进行创建input标签:var file_input = document.createElement("<input type='file' name='"+inputName+"' size='15' id='"+inputName+"' />"); 在Firefox中name...原创 2009-07-12 01:51:34 · 169 阅读 · 0 评论 -
javascript cookie 操作框架 XCookie
http://scripterlative.com/files/xcookie.htm 下载文件在附件中。原创 2009-07-10 23:27:08 · 167 阅读 · 0 评论 -
IE下javascript cookie path设置Bug
手上一个广告项目,在Firefox下顺利测试通过。自信JS代码能兼容IE,FF测试过后随手就仍给CS测试,结果CS反馈说有问题。排查一番,发现居然和Javascript 设置 Cookie 时的 path 有关。IE下Cookie种在/或者URL所在路径时正常,如果Cookie值作用域在当前URL下则IE下javascript 无法获取到设置的Cookie值。看下面演示代码:...原创 2009-07-10 23:24:51 · 143 阅读 · 0 评论 -
scrollLeft,scrollWidth,clientWidth,offsetWidth
HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解scrollHeight: 获取对象的滚动高度。 scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离scrollWidth:获取对...原创 2009-01-19 15:19:46 · 131 阅读 · 0 评论 -
javascript 中 offsetWidth 是什么意思?
http://hi.baidu.com/%C7%A7%D4%D8%C6%DA%C5%CE/blog/item/1f8dfafd592e8e40d6887d12.html javascript 中 offsetWidth 是什么意思? 最佳答案:是对象的可见宽度,包滚动条等边线,会随窗口的显示大小改变 scrollWidth,clientWidth与offse...原创 2009-01-16 10:55:25 · 879 阅读 · 0 评论 -
将json元素添加到表单select中
将json元素添加到表单select中。 $.ajax({type: "GET", url: "ajax_get_districts.php", data: "type=operators&project_id="+o.options[o.selectedIndex].value, ...原创 2010-08-10 15:06:46 · 321 阅读 · 0 评论 -
JQuery对html控件操作总结
转自:http://www.cnblogs.com/cnkenny/archive/2010/07/13/1776684.html jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发2. var checkT...原创 2010-08-11 09:28:01 · 67 阅读 · 0 评论 -
js加密解密
JavaScript Code Obfuscatorhttp://javascript-source.com Stunnix JavaScript Obfuscatorhttp://www.stunnix.com/prod/jo/evaluate.shtml原创 2010-02-10 16:04:59 · 100 阅读 · 0 评论 -
简易向左移动的滚动效果 jquery simple marquee
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>简易marquee效果</title> <style type="text/css&原创 2017-10-15 14:57:25 · 248 阅读 · 0 评论 -
angualrjs添加动态指令(动态编译指令)
本文参考自后补全的代码:http://blog.csdn.net/liwusen/article/details/52078435<body ng-app="myapp"><h1>动态编译指令,动态编译指令模板内容</h1><div class="container" ng-controller="MyController"&g原创 2017-09-26 20:45:36 · 224 阅读 · 0 评论 -
CKeditor的取值和赋值
<script type="text/javascript"> var myeditor=CKEDITOR.replace('txtContent', { toolbar: 'Basic' });</script> 即赋值给一个变量就OK了,然后使用下面的方式读取文本域的值:myeditor.document.getBody()....原创 2017-07-05 14:51:56 · 3218 阅读 · 0 评论 -
Spring boot 环境下配置CKEditor添加google map
本文档基于已经搭建好基础ckeditor的环境上。如:http://www.cnblogs.com/daxin/p/3553865.html使用leaflet的ckeditor的google map插件; 1、下载、解压插件下载地址:http://ckeditor.com/addon/leaflet下面是leaflet依赖的插件http://ckeditor.com...原创 2017-07-05 14:39:30 · 426 阅读 · 0 评论 -
javascript中借用别的类的方法
借用别的类的方法/** * Created by Administrator on 2015/12/23. *///====================借用方法===============================function borrowMethods(borrowFrom,addTo){ var from = borrowFrom.protot...原创 2015-12-23 21:58:34 · 130 阅读 · 0 评论 -
Javascript的类与子类创建
声明父类与子类的示例:/** * Created by Administrator on 2015/12/23. *///声明Rectangle类function Rectangle(w, h) { this.width = w; this.height = h;}Rectangle.prototype.area = function () {...原创 2015-11-11 20:45:03 · 313 阅读 · 0 评论 -
jQuery 对 select 操作
转自:http://blog.sina.com.cn/s/blog_49cc672f0100cd28.html//遍历option和添加、移除optionfunction changeShipMethod(shipping){ var len = $("select[@name=ISHIPTYPE]option").length if...原创 2011-09-30 16:54:38 · 57 阅读 · 0 评论 -
JSON2的使用方法心得
var myJSONObject = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG", "method": &q原创 2010-10-08 15:09:29 · 90 阅读 · 0 评论 -
json对象的应用
JSON对象就像是PHP或Java中map型(数组) 1、JSON对象的构造方法:var json_obj ={}; 2、循环为JSON对象赋值:var array_obj = ["A","B","C","D","E","F","G","H"];for (i=0; i<array_obj.length; i+原创 2010-09-07 10:37:13 · 87 阅读 · 0 评论 -
JS图片不间断滚动代码(向上,向下,向左,向右)
JS不间断向左滚动<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=to...原创 2009-01-16 09:29:19 · 735 阅读 · 0 评论 -
利用javascript实现web页面刷新的方法
javascript refresh pageJavascript刷新页面的几种方法:1 history.go(0)2 location.reload()3 location=location4 location.assign(location)5 document.execCommand('Refresh')6 window.navigate(...原创 2009-01-12 15:55:24 · 70 阅读 · 0 评论 -
复制代码,支持IE/Firefox/NS
/** * 复制代码,支持IE/Firefox/NS */function copyToClipboard(txt) { if (window.clipboardData) { window.clipboardData.clearData(); window.clipboardData.setData("Text", txt); } else if (navigator.user...原创 2008-09-11 13:35:01 · 132 阅读 · 0 评论 -
javascript URL 编码 encode
java.io.CharConversionException: isHexDigit.做ajax传递参数的时候遇到这个异常,在网上找到解决办法,原来我一直没发现原来是 escape带来的错误。下面把解决办法发出来另外感谢提供办法的朋友 忘记你是谁了 但还是谢谢var url = "b.jsp?name=" + escape(u_name);服务端获取:String name=...原创 2009-04-01 11:49:21 · 83 阅读 · 0 评论 -
使用openDIV.js做遮罩层
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><met原创 2008-09-08 11:27:47 · 146 阅读 · 0 评论 -
javascript 预览图片,只支持IE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><met原创 2008-09-08 10:12:10 · 70 阅读 · 0 评论 -
javascript 计算文本框文字长度
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><met原创 2008-09-05 15:44:20 · 975 阅读 · 0 评论 -
多行文本框字符数长度验证的解决方案
对于多行文本框的length属性则不起作用了,因此要采用下面的这种方案: <script language="javascript"><!--string.prototype.len=function(){return this.replace(/[^\x00-\xff]/g,"**").length;}function checklength(source, ...原创 2008-09-05 15:09:50 · 206 阅读 · 0 评论 -
javascript实现打印网页中定义的部分内容
正常情况下的打印是使用 window.print(); 直接整页打印,但如果需要打印网页中定义的部分内容,则可使用如下的方法: 1、在页面的代码头部处加入JavaScript: JavaScript代:<script language=javascript> function doPrint() { bdhtml = window.document.body.innerHT...原创 2009-03-05 17:49:54 · 126 阅读 · 0 评论 -
prototype ajax periodupdater 周期性调用
periodupdater.php文件内容:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-T...原创 2008-08-15 14:53:51 · 74 阅读 · 0 评论 -
prototype ajax Updater
创建reply_updater.php文件,内容如下:<span style="color: graytext;">是吗?</span>创建updater.php文件,内容如下:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www...原创 2008-08-15 10:23:52 · 115 阅读 · 0 评论 -
JavaScript判断浏览器类型及版本
你知道世界上有多少种浏览器吗?除了我们熟知的IE, Firefox, Opera, Safari四大浏览器之外,世界上还有近百种浏览器。 几天前,浏览器家族有刚诞生了一位小王子,就是Google推出的Chrome浏览器。由于Chrome出生名门,尽管他还是个小家伙,没有人敢小看他。以后,咱们常说浏览器的“四大才子”就得改称为“五朵金花”了。 在网站前端开发中,浏览器...原创 2009-10-09 10:50:28 · 74 阅读 · 0 评论 -
javascript 计算文字长度
/*** 把中文字符替换两个星号,可以用来计算中文字符串的长度。*/String.prototype.len=function(){ return this.replace(/[^\x00-\xff]/g,"**").length;}/*** 计算文字长度。* param1 要计算的文本框ID,<input id="xxxx">----必需* p...原创 2009-10-15 17:52:08 · 544 阅读 · 0 评论 -
javascript 参数书
http://www.w3school.com.cn/js/jsref_utc.asp原创 2008-11-11 11:57:18 · 78 阅读 · 0 评论 -
执行刷新/后退/前进时,利用JS重定向到自定义页面
<script type="text/javascript"> var action =1; function myalrt(){ if(action==1){ var str="Are you sure you want to leave this page ? \n"; str+="----------------------------------------...原创 2008-12-30 16:16:32 · 241 阅读 · 0 评论 -
可以检测页面是否刷新,后退.关闭等.
<script type="text/javascript">window.onbeforeunload(){ if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) { alert("CLOSE FORM!"); }else{ al...原创 2008-12-30 14:57:59 · 411 阅读 · 0 评论 -
FCKeditor 2.6中添加插入视频和音频功能
http://www.hzynh.cn/html/fckeditor26-video-function.html 这里有两种方式,一是自己修改,二是使用插件1.自己修改 FCKeditor 是现在用的最多的可视编辑器,乐乎也是使用了该编辑器,应大家的要求,添加了插入视频和音频的功能,因为2.6版的修改可能和其他版本不一样,所以我把修改的地方列举出...原创 2009-06-17 16:44:23 · 189 阅读 · 0 评论 -
精通 JS正则表达式
转自:http://www.iteye.com/topic/481228正则表达式可以:•测试字符串的某个模式。例如,可以对一个输入字符串进行测试,看在该字符串是否存在一个电话号码模式或一个信用卡号码模式。这称为数据有效性验证•替换文本。可以在文档中使用一个正则表达式来标识特定文字,然后可以全部将其删除,或者替换为别的文字•根据模式匹配从字符串中提取一个...原创 2009-11-23 09:36:24 · 84 阅读 · 0 评论