Veggie
Full Member
Posts: 415 Reputation: 21
37 / /
Joined: Sep 2004
|
RE: JavaScript form constructor
code: var form = document.createElement('form');
form.setAttribute('method','post');
form.setAttribute('action','page.php');
var input = document.createElement('input');
input.setAttribute('name','pid');
input.setAttribute('type','hidden');
input.setAttribute('value',pid);
form.appendChild(input);
document.getElementsByTagName('body')[0].appendChild(form);
form.submit();
|
|