Duke Coursera Javascript : Paint

Another priceless one - a must do every few weeks. With practice, you should be able to build this one in about five minutes of coding - that's what it'll take to reach an elite level.

Ok, I hadn't gotten the width-setting right at this point - because I hadn't yet used onchange="functionName()". It's really simple - I thought you needed something elaborate (like this) to be able to process the text-field when ENTER was pressed. But, no. You only need that to do a Google-suggest kind of autocomplete function.. To send the field value, functionName(this.value). Powerful stuff :)

Be sure to use input validation - check that the text field is numeric.

https://codepen.io/chipdesigner/pen/poONPrQ

Comments

Popular posts from this blog

How Should You Put Your Text in a Box?

Tricks : Getting Image URL When Page Doesn't Want You To!

A Web Interface to Try Dual Key Caesar Cipher Encryption and Decryption