我正在尝试使用 JQuery 更改输入字段的值,但我不知道为什么这不起作用。它不会引发错误,但不会改变。我正在使用 appgyver 类固醇进行构建,但我认为这并不重要。
javascript:
$(document.getElementById("url")).val('test');
html
<input type="text" id="url" class="topcoat-text-input"
style="margin-left:10%; margin-top:10px; width: 80%; text-align: center" autocapitalize="off"
autocorrect="off" required="true"
placeholder="something else"/>