Skip to content

Instantly share code, notes, and snippets.

@csdear
Created March 7, 2016 17:28
Show Gist options
  • Save csdear/e77a30230b0873ae4d5a to your computer and use it in GitHub Desktop.
Save csdear/e77a30230b0873ae4d5a to your computer and use it in GitHub Desktop.
Basic jScript Web Scaffold.js
/*
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