Site Notice

hello, world

Difference between revisions of "FormData"

From Project-EPB Commons
([InPageEdit] 没有编辑摘要)
 
([InPageEdit] 没有编辑摘要)
Line 2: Line 2:
 
<form id="myForm">
 
<form id="myForm">
 
<label>
 
<label>
<input type="file" name="myFile"/>
+
<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>

Revision as of 16:29, 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>