Skip to main content

Posts

Showing posts from June, 2018

Mortgage simulator app in Javascript

Input text in Javascript

HTML input tag Get Input value Concat strings We are displaying an input box for the user to input their name. When clicking a button we display the name in a HTML element. Sample: http://javascript.kennyming.com/code/3-input-text-javascript/ Code: https://github.com/kennymingt/javascript/tree/master/code/3-input-text-javascript

Using Buttons in JavaScript

Console message for debug Constants Add Events listeners to DOM Elements functions We are going to display a message when we click a button. We have two elements with Id in the HTML, the button and a div to display a message. In our JavaScript file we grab a reference to elements in the HTML. We add a function to the Click event of the button. Sample: http://javascript.kennyming.com/code/2-buttons-in-javascript/ Code: https://github.com/kennymingt/javascript/tree/master/code/2-buttons-in-javascript