Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- path = "?action=profile";
- params = {username: 'liftu', status: 'on'};
- method = method || "post";
- var form = document.createElement("form");
- form.setAttribute("method", method);
- form.setAttribute("action", path);
- for(var key in params) {
- if(params.hasOwnProperty(key)) {
- var hiddenField = document.createElement("input");
- hiddenField.setAttribute("type", "hidden");
- hiddenField.setAttribute("name", key);
- hiddenField.setAttribute("value", params[key]);
- form.appendChild(hiddenField);
- }
- }
- document.body.appendChild(form);
- form.submit();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement