我想使用Chrome控制台更新输入内容。
班级:
<input type="text" class="answerInput __web-inspector-hide-shortcut__" maxlength="20" autocomplete="off">
答案 0 :(得分:0)
所以你想在控制台中键入这样的东西
对于ID:
$('#ID-OF-INPUT-GOES-HERE').val('I will appear in input')
对于班级:
$('.CLASS-OF-INPUT-GOES-HERE').val('I will appear in input')
或
document.getElementsByClassName('CLASS-OF-INPUT-GOES-HERE')[0].value = 'i will appear in input'