我是jQuery初学者。 我正在尝试使用Firefox plus Greasemonkey修改我正在浏览的页面的源代码。
我该如何修改:
<input id="HiddenCategory" type="hidden" name="PageCategory"></input>
为:
<input id="HiddenCategory" type="text" name="PageCategory" value="OTHER"></input>
答案 0 :(得分:1)
这样的东西?
$("#HiddenCategory").attr("type", "text").val("OTHER");
这是未经测试但我认为它应该可以正常工作。