/ Published in: JavaScript
when testing forms you don't always want to fill in dummydate
this is a function i used to autofill and select values.
this is a function i used to autofill and select values.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function dummyreg() { var currentTime = Date.parse(new Date()); document.getElementById("nickname").value = "dummynick" + currentTime; document.getElementById("checkbox").checked = true; // checkbox document.getElementById("radiobutton").checked = true; // radiobutton document.getElementById("pulldown").selectedIndex = 2; // dropdown }