开发者

Greasemonkey to Change Readonly from True to False

开发者 https://www.devze.com 2022-12-16 16:20 出处:网络
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 th

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号