OK, new to JS, but I have a HTML form with a input box. This input box value needs to be = to a JavaScript function I wrote and I can't get it to work.
In the head I have the location of my js file. Basically, I want to have the input box value = the JavaScript function.
<script src="js/functions.js"></script>
The HTML input box
<input type="text" name="date" id= "date" value= "" class="inputBox"
disabled />
The JavaScript function
function dateToday{
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10) {
dd='0'+dd
}
if(mm<10) {
mm='0'+mm
}
today = mm+'/'+dd+'/'+yyyy;
document.write(today);
}