I have a script to select form options. How can I change the document ready function to Javascript instead of using jQuery?
$(document).ready(function () {
function FormFill() {
if {
var el1 = document.getElementsByName("FormOption1")[0];
if(typeof el1 !== 'undefined') {el1 = 1;}
var el2 = document.getElementsByName("FormOption2")[0];
if(typeof el2 !== 'undefined') {el2 = 2;}
}, 100);
}
}
setTimeout(FormFill,5000);
});