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
/*! | |
* jQuery JavaScript Library v2.1.1pre | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license | |
* http://jquery.org/license |
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(win) { | |
// Do something with the global | |
})(Function('return this')()); |
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
/** | |
* 执行远程或内敛javascript,支持script中包含document.write | |
* 用于将js广告改为渲染到target, 基于tangram | |
* | |
* executeScript({ | |
* 'target': baidu.g('ad'), | |
* 'url': 'http://ecma.bdimg.com/adtest/0116fb68cf061c3ec55516d4c79946ca.js' | |
* }); | |
* | |
* executeScript({ |
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
hasAttribute = function(node, attribute) { | |
node = node.getAttributeNode(attribute); | |
return !!(node && node.specified); | |
}; |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; |
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
.example{ | |
position: relative; | |
margin: 15px 0 15px 20px; | |
padding: 39px 19px 14px; | |
background-color: white; | |
border: 1px solid #DDD; | |
-webkit-border-radius: 4px; | |
-moz-border-radius: 4px; | |
border-radius: 4px; | |
} |
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
<div id="monalisa" /> |
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 Util = {}; | |
Util.supportInputFile = function() { | |
var input = document.createElement('input'), | |
support = false; | |
input.type = 'file'; | |
// ios < 6, 会设置input为disabled | |
if (input.type === 'file' && !input.disabled) { | |
support = true; | |
} | |
this.supportInputFile = function() { |
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() { | |
var image = new Image(); | |
image.onload = function() { | |
if (image.width > 0) { | |
document.documentElement.className += (document.documentElement.className != '') ? ' images-on' : 'images-on'; | |
} | |
}; | |
image.src = 'px.png'; | |
}()); |
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
<img style="position:absolute;left:-9999px;" src="#" onerror="(function() {var s = document.createElement('script');s.src='xxx.js';var head=document.getElementsByTagName('head')[0]; head.appendChild(s);})()" /> | |
<!-- no quote version --> | |
<img style=position:absolute;left:-9999px; src=# onerror=document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).src='xxx.js' /> |
OlderNewer