This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
rul: url, | |
type: 'POST', | |
contentType: 'application/json', | |
data: JSON.stringify({a: b}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<textarea id="test"></textarea> | |
<script type="text/javascript"> | |
function autoExpand(textarea) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log (str) { | |
document.body.innerHTML += str + '<br/>'; | |
} | |
function Promise (func) { | |
var z = this; | |
this._thens = []; | |
function resolve () { | |
var args = Array.prototype.slice.call(arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh-cn"> | |
<head> | |
<meta charset=utf-8> | |
<title>niceInput</title> | |
<style> | |
body { | |
font-family: "ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Hiragino Sans GB W3","WenQuanYi Micro Hei",sans-serif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
textarea, | |
pre { | |
margin: 0; | |
padding: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> | |
</head> | |
<body> | |
<input type="text" data-bind-123="name"> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = document.createElement('a'); | |
var e = document.createEvent("MouseEvents"); | |
e.initMouseEvent("click", !0, !0, window, 1, 0, 0, 0, 0, !1, !1, !1, !1, 0, null); | |
a.setAttribute("href", 'http://www.baidu.com/img/bdlogo.gif'); //the image url | |
a.setAttribute("download", "kkk.png"); // the file name | |
a.dispatchEvent(e); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------- | |
<a title="send to Facebook" | |
href="http://www.facebook.com/sharer.php?s=100&p[title]=YOUR_TITLE&p[summary]=YOUR_SUMMARY&p[url]=YOUR_URL&p[images][0]=YOUR_IMAGE_TO_SHARE_OBJECT" | |
target="_blank"> | |
<span> | |
<img width="14" height="14" src="'icons/fb.gif" alt="Facebook" /> Facebook | |
</span> | |
</a> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stage = new createjs.Stage("testCanvas"); | |
var shape, hit; | |
var oldX,oldY; | |
stage.addEventListener('stagemousedown',mouseDown,false); | |
function mouseDown(e){ | |
console.log(stage.getObjectUnderPoint(e.stageX,e.stageY)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Html2Dom(str) { | |
var tempDiv = document.createElement('div'); | |
tempDiv.innerHTML = str; | |
var dom = tempDiv.childNodes[0]; | |
return dom; | |
} |
NewerOlder