How to extract a specific input field value from external webpage using Javascript

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-03-08T01:16:44Z Indexed on 2010/03/08 1:18 UTC
Read the original article Hit count: 272

Filed under:
|

Hi, i get the webpage content from an external website using ajax but now i want a function which extract a specific input field value which is already autofilled.

the webpage content is like this:

.........
<input name="fullname" id="fullname" size="20" value="David Smith" type="text">
<input name="age" id="age" size="2" value="32" type="text">
<input name="income" id="income" size="20" value="22000$" type="text">
.........

I only want to get the value of fullname, maybe with some javascript regex, or some jQuery dom parser, i know i can do it easily with php but i want it using Javascript or jQuery.

Note: this inputs are not hosted in my page, they are just pulled from other website through Ajax.

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery