trying to change a websites text entry field that is currently set to read only to false. The reason being it has an 'Upload" button where you browse to the file o开发者_如何学运维n your computer then hit upload. I just want to set the path in a script but since the text field is read only i cannot.
A file
input is not the same as a textfield. Changing the textfield text to display the file path won't magically make your browser upload the associated file. In fact, if this were doable with Javascript, it would be a huge security hole.
It sounds like you're describing an <input type="file">
. If so, you can't manipulate its value via JavaScript. It's a security risk and JavaScript won't allow it.
精彩评论