码迷,mamicode.com
首页 >  
搜索关键字:replace    ( 7027个结果)
ckeditor源码编辑模式,添加style、javascript内容丢失的解决
我使用ckeditor 我在编辑的使用源码编辑,保存内容包含javascript、style标签的时候,数据库中有javascript、style标签 , 输入到页面也可以执行,但是我再次编辑的时候就不见了。添加allowedContent: true就可以了 CKEDITOR.replace( ' ...
分类:编程语言   时间:2017-10-16 11:12:06    阅读次数:207
输入框自动清除首尾空格
输入框自动清除首尾空格 在输入框加入onkeyup="this.value=this.value.replace(/^\s+|\s+$/g,'')" ...
分类:其他好文   时间:2017-10-16 09:38:59    阅读次数:111
js 的内置对象有哪些?列举一下 arry 和 string 的常用方法?
String:charAt(); charCodeAt(); indexOf(); match(); replace(); search(); slice(); toUpperCase(); toLowerCase(); 等 方法 charAt(); var str="HELLO WORLD"; v ...
分类:Web程序   时间:2017-10-15 21:26:20    阅读次数:431
格式化Json传递的日期
自定义日期类型转化函数ChangeDateFormat,将//Date(1294499956278+0800)//形式的函数转化为2014-5-2形式 ...
分类:Web程序   时间:2017-10-15 21:09:03    阅读次数:186
Oracle 序列 sequence
序列:是oracle提供的,用于产生唯一数值的对象,主要配合表的单一主键使用。 创建序列: create sequence seq_NAME//命名 start with 1//初始值 increment by 1//递增值 minvalue 1//最小值,可缺省,采用系统默认值 maxvalue ...
分类:数据库   时间:2017-10-15 21:06:38    阅读次数:177
LeetCode 471: Encode String with Shortest Length
Note: 1. We start with different position and different length to find the shortening. 2. It satisfy following conditions : I. if length < 4, it short ...
分类:Web程序   时间:2017-10-15 17:40:18    阅读次数:305
js字符串两边截取空白的trim的原型方法的实现
String.prototype.trim = function(){ return this.replace(/(^\s*)|(\s*$)/g,''); } 例子: var test = " abc "; String.prototype.trim = function(){ return thi ...
分类:Web程序   时间:2017-10-15 14:43:11    阅读次数:174
Javascript正则笔记
1. 生成正则表达式对象的方法 1. var rx = new RegExp(pattern, attributes) 参数pattern是正则表达式字符串 参数attributes是一个字符串,可以是i(表示忽略参数) m(表示多行匹配) g(表示全局匹配) ,也可以是它们的组合 2. var r ...
分类:编程语言   时间:2017-10-15 00:37:22    阅读次数:128
js 计算时间差
function GetDateDiff(startDate,endDate) { var startTime = new (Date)(Date.parse(startDate.replace(/-/g,"/"))).getTime(); var endTime = new (Date)(Date... ...
分类:Web程序   时间:2017-10-14 18:30:34    阅读次数:231
js之string操作符
1.字符方法 2.字符串方法 3.字符串位置方法 indexOf和lastIndexOf,第一个参数的要匹配的字串,第二参数是开始查找的位置 4.trim清除前后空格 5.匹配 ...
分类:Web程序   时间:2017-10-14 17:07:13    阅读次数:263
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!