get html value from datatable
get html value from datatable
I have datatable which some cell column is dynamically produce HTML tags. i can get all the row data when row changed by
'''
$(document).on('change', '#datatableiqc tbody tr', function(){
var table = $('#datatableiqc').DataTable();
var rowdatas = table.row(this).data();
var arrheader = [];
$(this.id + "thead th").each( function () {
var headtitle = $(this).text();
headtitle = headtitle.replace(/ /g,'_');
arrheader.push(headtitle);
});
var newdataarr = newdata(arrheader, rowdatas);
// console.log(newdataarr);
});
'''
it resulting {"Rec_Date":"09 Dec 2019","Order_No":"694297","Part_No":"44017408800202","Part_Description":"*SUPPORT AB(LOADCELL SUPPORT)","Del_Qty":"284","Supplier":"Grandwin (S) Enterprise","Urgent_Status":"<select name='selecturgent'><option value='0'>-</option><option value='Urgent'>Urgent</option></select>","Inspector_Name":"<select name='inspectorname'><option value='0'>-</option><option value='DARMAWAN'>DARMAWAN</option><option value='JUSRI'>JUSRI</option><option value='FAIZA RAHMAH'>FAIZA RAHMAH</option><option value='HEIDAR KHAFIDZ ADDILA'>HEIDAR KHAFIDZ ADDILA</option><option value='BOBBY NURMA YUSHA PUTRA'>BOBBY NURMA YUSHA PUTRA</option><option value='JELI NOFRIZAL'>JELI NOFRIZAL</option><option value='HERYANTO MANURUNG'>HERYANTO MANURUNG</option><option value='SANGKOT MANALU'>SANGKOT MANALU</option><option value='RISKA DWI SAFITRI'>RISKA DWI SAFITRI</option><option value='ICHA ROHANI'>ICHA ROHANI</option><option value='BURHANUDIN'>BURHANUDIN</option><option value='MASRIL'>MASRIL</option><option value='IWAN NURCAHYO'>IWAN NURCAHYO</option><option value='SURIADI'>SURIADI</option><option value='ABDUL WAHID'>ABDUL WAHID</option></select>","Target_Inspector":"<input type='text' value='-' class='datepicker'></input>"}
and I want to get the value instead of html tags. how to get only the value or the data like
{"Rec_Date":"09 Dec 2019","Order_No":"694297","Part_No":"44017408800202","Part_Description":"*SUPPORT AB(LOADCELL SUPPORT)","Del_Qty":"284","Supplier":"Grandwin (S) Enterprise","Urgent_Status":"Urgent","Inspector_Name":"JUSRI","Target_Inspector":"2019-12-11"}