简体   繁体   English

使用URLbar更改文本框值? (也许是JavaScript?)

[英]Use URLbar to change textbox value? (JavaScript maybe?)

Is there any way I can use the URLbar to change the value (the text) of a textbox? 有什么方法可以使用URLbar更改文本框的值(文本)?

I can type "javascript:alert(document.lastModified)" into the URLbar, and it runs just fine--how can I run some javascript that says "Change X textbox's value to = Y"? 我可以在URLbar中键入“ javascript:alert(document.lastModified)”,它运行得很好-如何运行一些显示“将X文本框的值更改为= Y”的JavaScript?

假设您要以相同的方式运行它:

javascript:document.getElementById('IDOFTEXTBOX').value='something';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM