({age: 12}, {validate : true});
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
stylesheet.insertRule(rule, index) | |
https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet.insertRule | |
CSSStyleSheet.deleteRule() | |
document.styleSheets[0].insertRule('#elid:hover { background-color: red; }', 0); | |
document.styleSheets[0].cssRules[0].style.backgroundColor= 'red'; | |
=== | |
document.styleSheets[0].addRule('#elid:hover', 'background-color: red', 0); | |
document.styleSheets[0].rules[0].style.backgroundColor= 'red'; |
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
$("#test4000").keydown(function(e){ | |
console.log("%s %s","enter keypress", e.keyCode); | |
var value = $(this).val() + String.fromCharCode(e.keyCode); | |
$(this).val(value); | |
}) | |
$("#test3000").click(function(){ | |
console.log("enter!"); | |
var e = $.Event("keydown"); | |
e.keyCode = e.which = 50; |
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
//defile out style debug css code | |
//eg; | |
.xxy { | |
color:green; | |
font-size:16px; | |
font-weight:bold; | |
} | |
// js code read and format css |
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 exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log; | |
if (!(window.console && window.console.log)) { | |
return; | |
} | |
log = function() { | |
var args; | |
args = []; |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature ':5.14'; | |
use Data::Dumper::Concise; | |
use Template; | |
use Carp qw /croak carp confess/; | |
use YAML; | |
my $whereconfig ; |
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> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Looking At Underscore.js Templates</title> | |
</head> | |
<body> | |
<h1> | |
Looking At Underscore.js Templates |
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
//congratulate 163.com | |
curl -L -I http://www.163.com/ | |
curl: (56) Recv failure: Connection was reset | |
curl -L -I http://www.163.com/ | |
curl: (56) Recv failure: Connection was reset |
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
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.11/require.min.js" type="text/javascript"> | |
</script> | |
<script > | |
require.config({ | |
paths : { | |
domReady:'//cdnjs.cloudflare.com/ajax/libs/require-domReady/2.0.1/domReady', | |
backbone : '//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min', | |
underscore : '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min', | |
jquery : '//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min', | |
marionette : '//cdnjs.cloudflare.com/ajax/libs/backbone.marionette/1.8.0/backbone.marionette.min' |
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
script inject | |
<script id="id300" type="text/javascript"> | |
var a= 12345; | |
</script> | |
do this ^_^ | |
var cc = $("#id300").html(); |