Simple JavaScript for Input Validation

Enter a value and click the button to show it in an alert box: