Created
March 7, 2016 17:28
-
-
Save csdear/e77a30230b0873ae4d5a to your computer and use it in GitHub Desktop.
Basic jScript Web Scaffold.js
This file contains hidden or 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 basic javascript scaffold template, considering input, the function and output. | |
<<>> are variable areas. | |
*/ | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<p>Click the button</p> | |
//input | |
<button onclick="<<fName>>()">Click</button> | |
//output | |
<p id="output"></p> | |
<script> | |
//function | |
function <<fName>>() { | |
var someVarA; | |
var someVarB; | |
//Logic to preform some task considering input and output | |
return someReturn; | |
// Output back to the user | |
document.getElementById("output").innerHTML = someReturn; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment