1

I'm jQuery beginner. I'm trying to modify the source code of a page I'm browsing, using Firefox plus Greasemonkey.

How can I modify:

<input id="HiddenCategory" type="hidden" name="PageCategory"></input>

to:

<input id="HiddenCategory" type="text" name="PageCategory" value="OTHER"></input>

?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Valeria Kaya
  • 147
  • 2
  • 13

1 Answers1

1

Something like this?

$("#HiddenCategory").attr("type", "text").val("OTHER");

This is untested but i think it should work ok.

griegs
  • 22,624
  • 33
  • 128
  • 205