I have this variable in javascript:
var datos = '<input type="hidden" name="i_txt_Prod_Code" value="Foo_Bar" tabindex="1">01080';
I need get the text 01080 from this, ignoring the hidden input or any other input tag.
var text = data.text(); //I used this but it did not work
if (data.match("<input")) {
var datos = $(data);
datos.find("input[type=hidden]").each(function(index) {
$(this).remove();
});
data = datos.html();
}
not duplicated @HereticMonkey pls read the post first. i am using jquery no javascript pure. o EMC structure.
input? If thevalueof that always matches the text you want to retrieve, it would be far easier to just read it from there.value. In any case, see my answer below