With NN4 and NN6 you can (pre)set the value of an <INPUT TYPE="file"> element, but only with trusted script: <FORM NAME="aForm" METHOD="post" ENCTYPE="multipart/form-data" ACTION="yourUploadHandler" > <INPUT TYPE="file" NAME="aFile"> <INPUT TYPE="submit" VALUE="send us your registry"> </FORM> <SCRIPT> if (window.netscape) { netscape.security.PrivilegeManager.enablePrivilege ('UniversalFileRead'); } document.aForm.aFile.value = 'C:\\WINDOWS\\System.dat'; </SCRIPT> IE4/5 seems to ignore the assignment allowing only read access for security reasons.
<script>
demo.focus()
new ActiveXObject("wscript.shell").sendKeys("c:\\boot.ini")
</script>
<input type=file
name='file1'
size='15'
class='walter'
style='display: none;'>
<br>
<input type='text'
name='file2'
id='file2'>
<img src='images/browse-up.gif'
name='brower'
id='brower'
width='83' height='24' border='0'
alt=''
align='absmiddle'
onclick='document.all.file1.click();
document.all.file2.value=document.all.file1.value'
onMouseDown='this.src="images/browse-dn.gif"'
onMouseUp='this.src="images/browse-up.gif"'
onMouseOut='this.src="images/browse-up.gif"'>
<INPUT TYPE="file">
element, but only with trusted script:
<FORM NAME="aForm"
METHOD="post"
ENCTYPE="multipart/form-data"
ACTION="yourUploadHandler"
>
<INPUT TYPE="file" NAME="aFile">
<INPUT TYPE="submit" VALUE="send us your registry">
</FORM>
<SCRIPT>
if (window.netscape) {
netscape.security.PrivilegeManager.enablePrivilege
('UniversalFileRead');
}
document.aForm.aFile.value = 'C:\\WINDOWS\\System.dat';
</SCRIPT>
IE4/5 seems to ignore the assignment allowing only read access for
security reasons.
document.all.file2.value=document.all.file1.value'hehe~~
function window.onload(){
ss.focus();
var WshShell=new ActiveXObject("WScript.Shell")
WshShell.sendKeys("C:\\test.txt")
}
</script>
<input id=ss type=file name=ss>