Alon Gubkin Alon Gubkin - 1 year ago 138
HTML Question

How to set a value to a file input in HTML?

<input type="file" />

How can I set the value of this?

Answer Source

You cannot due to security reasons.


<form name="foo" method="post" enctype="multipart/form-data">
    <input type="file" value="c:/passwords.txt">

You don't want the websites you visit to be able to do this, do you? =)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download