一、什么是正则表达式?
简单的说:正则表达式(Regular Expression)是一种处理字符串匹配的语言;
正则表达式描述了一种字符串匹配的模式,可以用来检查一个字符串是否含有某种子串,对匹配到的子串进行“取出”或“替换”操作。
二、正则表达式的应用
正则表达式在实际的开发过程中非常实用,能够快速解决一些复杂的字符串处理问题,下面我对正则表达式的应用做一些简单分类:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
1, tooltip | |
简介: 弹出提示框功能 | |
功能: hover 或 click 触发 | |
ajax加载内容 | |
与弹出框交互功能(interactive) | |
自定调整弹出框位置(autoPosition) | |
动画效果 'fade' 'zoom' | |
2, colorInput | |
简介: 功能强大的颜色选择器功能 |
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument | |
var previewNode = document.querySelector("#template"); | |
previewNode.id = ""; | |
var previewTemplate = previewNode.parentNode.innerHTML; | |
previewNode.parentNode.removeChild(previewNode); | |
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone | |
url: "/target-url", // Set the url | |
thumbnailWidth: 80, | |
thumbnailHeight: 80, |
<!-- HTML heavily inspired by http://blueimp.github.io/jQuery-File-Upload/ --> | |
<div class="table table-striped" class="files" id="previews"> | |
<div id="template" class="file-row"> | |
<!-- This is used as the file preview template --> | |
<div> | |
<span class="preview"><img data-dz-thumbnail /></span> | |
</div> | |
<div> | |
<p class="name" data-dz-name></p> |
<html> | |
<head> | |
<title>Look at WebSQL</title> | |
<script> | |
// Through the code below remember essentialy there are just 3 core methods we tend to use | |
// openDatabase | |
// transaction | |
// executeSql | |
// Opening a connection |
一、什么是正则表达式?
简单的说:正则表达式(Regular Expression)是一种处理字符串匹配的语言;
正则表达式描述了一种字符串匹配的模式,可以用来检查一个字符串是否含有某种子串,对匹配到的子串进行“取出”或“替换”操作。
二、正则表达式的应用
正则表达式在实际的开发过程中非常实用,能够快速解决一些复杂的字符串处理问题,下面我对正则表达式的应用做一些简单分类:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>一淘九宫格面试题</title> | |
<meta name='author' content='Steven | wangwen1220.github.io' /> | |
<style type="text/css"> | |
* { | |
margin: 0; | |
padding: 0; |