Autofill form using javascript

javascript: (function () {
function F1(ele, val) {
if (document.getElementById(ele) && val != “”) {
document.getElementById(ele).value = val;
}
}
F1(“comment”, “you are dog”);
F1(“author”, “cloud hosting”);
F1(“email”, “[email protected]”);
F1(“url”, “https://cloud-hosting.io”);
})();

here comment author email and url are ID

furhter to submit button automatically

javascript: (function () {
function F1(ele, val) {
if (document.getElementById(ele) && val != “”) {
document.getElementById(ele).value = val;
}
}
F1(“comment”, “you are dog”);
F1(“author”, “cloud hosting”);
F1(“email”, “[email protected]”);
F1(“url”, “https://cloud-hosting.io”);
document.getElementsByClassName(“submit”)[0].click();
})();

Leave a Comment

Your email address will not be published. Required fields are marked *

To Resolve this issue at just 5$ from ServerExpert

https://serverexpert.io/

For Hosting please visit Hostingwebsite.io

You have Successfully Subscribed!

Open chat