'tab_text' is a html code regenerated from 'mytable' by this code. All i want is for this regenerated html to have input values instead of input text fields. It will be used for some extraction task. For this , i found some code snippet and tried to edit that for my benefit:
var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";
var j=0;
mytable = document.getElementById('countersTable'); // id of table
for(j = 0 ; j < mytable.rows.length ; j++)
{
tab_text=tab_text+mytable.rows[j].innerHTML+"</tr>";
}
tab_text=tab_text+"</table>";
tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, "")
Obviously, I need to add a regex instead of "" at last line. I tried input[type=text][id^=*] It did not work.
Would you please help me find a solution to that issue?
input[type=text][id^=*]isn't a RegEx it's a jQuery selctor