var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "name_you_want"); input.setAttribute("value", "value_you_want"); //append to form element that you want . document.getElementById("chells").appendChild(input);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter