Site Notice
hello, world
Difference between revisions of "FormData"
From Project-EPB Commons
([InPageEdit] 没有编辑摘要) |
m ([InPageEdit] 没有编辑摘要) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
<form id="myForm"> | <form id="myForm"> | ||
<label> | <label> | ||
− | <input type="file" name=" | + | <input type="hidden" name="action" value="upload"/> |
+ | <input type="hidden" name="filename" value="test.png"/> | ||
+ | <br/> | ||
+ | <input type="file" name="file"/> | ||
+ | <br/> | ||
+ | <input name="token" value="" readonly/> <input type="button" onclick="$('input[name=\'token\']').val(mw.user.tokens.get('csrfToken'));return false;"/> | ||
</label> | </label> | ||
</html> | </html> |
Latest revision as of 16:30, 8 April 2020
<html> <form id="myForm"> <label> <input type="hidden" name="action" value="upload"/> <input type="hidden" name="filename" value="test.png"/> <br/> <input type="file" name="file"/> <br/> <input name="token" value="" readonly/> <input type="button" onclick="$('input[name=\'token\']').val(mw.user.tokens.get('csrfToken'));return false;"/> </label> </html>