向输入字段输入键击
input keystrokes to input field
我正试图通过在Chrome中使用tampermonkey来为Autotask添加一些自动化功能。我已经能够通过选择索引很容易地自动选择下拉选择。
有几个字段有一些自动完成功能,这不允许我只插入一个值。有人能给我指明正确的方向,这样我就可以在这些字段中输入值。
谢谢。
<span id="txtAllocationCode" imageid="txtAllocationCode_image"
controlid="txtAllocationCode_ATTextEdit" anchorid="txtAllocationCode_anchor"
style="display:inline-block;">
<input name="txtAllocationCode:ATTextEdit" type="text"
id="txtAllocationCode_ATTextEdit" class="txtBlack8Class"
autocomplete="off" data_field_uniqueid="txtAllocationCode_values"
onkeyup="AutoCompleteTextKeyUp(document.getElementById(
'txtAllocationCode_ATTextEdit'),event)"
dataselectortype="AllocationCodes" onmouseover="this.title=this.value;"
dataselectortextbox="true"
onblur="AutoCompleteTextOnBlur(document.getElementById(
'txtAllocationCode_ATTextEdit'))" data_field="txtAllocationCode_values"
onfocus="AutoCompleteTextOnFocus(document.getElementById(
'txtAllocationCode_ATTextEdit'))"
autocompletehashvalues="AutoCompleteHashValues='&selectorwarn=0'"
novaluedisplaytext="" dataselectorsubtype="AllocationCode_LaborAndTime"
style="width: 198px;" title="">
</span>
类似的操作应该将值放入输入字段中。
$(function() {
$("#txtAllocationCode_ATTextEdit").val("your value here");
});
如何设置输入值?您是否使用jquery作为库来操作html元素?
在为输入元素设置值之前,也许您可以尝试解除onkeyup、onmouseover和onfocus事件的绑定。
相关文章:
- 将输入字段中的文本提交到我的数据库,同时将其添加到我的列表中
- 而循环只设置php中输入字段中的第一个值
- 在输入字段中将最小金额设置为
- 如何在输入字段中的按钮的帮助下打开日历,该字段的类型为“=”;日期”;
- 如何在HTML输入字段中添加不可删除的后缀
- 互斥单选按钮和相应的输入字段
- 在IE9中的输入字段中输入焦点最近按钮
- 选中单选框时将属性添加到输入字段
- 当设置addFromAutocompleteOnly时,剩余文本将保留在输入字段中
- 我如何在数字插入中使用逗号,这样它就不会'不要破坏我的输入字段
- 在输入字段上有两个函数调用,一个在Blur上,一个不在Angular中
- 输入字段将't获取更新的值
- 如何选择多个输入字段并删除所需的属性
- 输入字段,只接受0到12之间的数字
- 单击鼠标,用MySQL数据填充html表单输入字段
- 使用jquery将输入字段转换为文本
- Model中的Typeahead返回空值以形成输入字段
- 如何从查询字符串中的输入字段发回文本
- 如何验证日期、月份和日期的3个独立输入字段;年使用jquery或javascript
- 将值传递给jquery创建的输入字段