greasemonkey code modification

Posted by muqtar on Stack Overflow See other posts from Stack Overflow or by muqtar
Published on 2010-06-03T20:13:20Z Indexed on 2010/06/03 20:24 UTC
Read the original article Hit count: 153

Filed under:
|

Hi,all..

A user has helped me find hidden values in a page and display it using alert. If there are radio buttons and one of them is related to this value,is there a way to select the radio button automatically rathar than displaying the value in alert box.. Thanks...

the code is as follows:

var inputs = document.getElementsByTagName('input');

for (i=0; i<inputs.length; i++) {
  if (inputs[i].getAttribute("name") == "ans") {
    alert(inputs[i].getAttribute("value"));
  }
}

this "value" must be selected in the radio button rathar than alerting...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about greasemonkey