需要帮助创建bookmarklet魔术自动填充表单 [英] need help in creating bookmarklet magic autofill form
问题描述
表格中有许多输入框如下。填写表单需要很长时间,所以我想使用javascript创建自动填充bookmarklet。所以我可以使用javascript设置文本框的所有值。
There are many input box in a form as below. It takes much time to fill form, so i want to create auto fill bookmarklet by using javascript. so that i can set all value of textbox using javascript.
<input id="addPassengerForm:psdetail:0:psgnName" name="addPassengerForm:psdetail:0:psgnName" class="input-style1 psgn-name" maxlength="16" size="20" type="text">
我使用了以下javascript代码也填充上面的文本框但是它不起作用。请指导我错在哪里。
I have used following javascript code too fill above textbox but it is not working. please guide me where i am wrong.
<a class="btn btn-primary btn-lg" önclick="javascript:alert('Drag me');return false;" href="java<!-- no -->script:document.getElementById(" mrinal=";">
Autofill
</a>
i使用了锚点标签,并在href上我已经编写了javascript代码,这样当我点击书签栏上的锚标签上的
时,它会自动将值填入文本框。
请帮助。
i have used an anchor tag , and on href i have written javascript code so that when i will click
on anchor tag from bookmark bar it will automatically fill value into textbox.
Please help.
推荐答案
请确保prope r使用getElementById
调用id标签而不用= = mark
please ensure the proper using getElementById
call the id tag without and = mark
这篇关于需要帮助创建bookmarklet魔术自动填充表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!