Created
May 20, 2013 21:15
-
-
Save aymannadeem/5615638 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<p> | |
Javascript fun times. Here's learning how to write Javascript directly into html output stream. | |
</p> | |
<script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropins.js" id="dropboxjs" data-app-key="isrbjpa0i5l8zpl"></script> | |
<input type="dropbox-chooser" name="selected-file" id="db-chooser"/> | |
<script type="text/javascript"> | |
document.getElementById("db-chooser").addEventListener("DbxChooserSuccess", | |
function(e) { | |
alert("Here's the chosen file: " + e.files[0].link) | |
}, false); | |
</script> | |
Dropbox.choose(options); | |
<script> | |
document.write("<h1>Doing stuff with headings.</h1>"); | |
document.write("<p>..and now with paragraphs.</p>"); | |
</script> | |
<p> | |
Use <strong>document.write</strong> in HTML output | |
If it's used after the document has loaded (ex. in a function), the whole doc will be overwritten. | |
</p> | |
<p> | |
yo dawg, Javascript is mad useful for reacting to events, like the click of a button: | |
</p> | |
<button type="button" onclick="alert("YIKES")">Click here</button> | |
</body> | |
</html> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment