How to operate Mini Program with JavaScript order
Today, Xiaobian will share with you the relevant knowledge points on how to use JavaScript order operation Mini programs. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you will gain something after reading this article. Let's learn about it together.
The specific code is as follows
Title table { text-align: center; } function delRow(id) { //Get the line to delete var row = document.getElementById(id);//find rows by id var table = document.getElementById('mytb'); table.deleteRow(row.rowIndex);//Delete the contents of a row according to the row index } function addrow() { var mytb = document.getElementById('mytb'); var index = mytb.rows.length - 1;//Get the index of the insertion target, a row var row = mytb.insertRow(index);//Insert a row into a position, insert a row var id = 'row' + row.rowIndex;//concatenation id row.setAttribute('id', id);//set id var td0 = row.insertCell(0);//td0 Create a cell td0[xss_clean] = "Beautiful, durable and wear-resistant sofa two-piece set";//Set the content of td0 var td1 = row.insertCell(1); td1[xss_clean] = row.rowIndex;//Assign row index to the contents of td1 var td2 = row.insertCell(2);//Insert td2 into a cell td2[xss_clean] = ''; } function update(id) { var row = document.getElementById(id); var td1 = row.cells[1]; var v = td1[xss_clean]; td1[xss_clean] = ''; row.cells[2][xss_clean] = ''; } function comfirmrow(id) { var row=document.getElementById(id); var td1=row.cells[1];//Get the second cell of each row var input=td1.firstChild;//get input label var v=input.value;//get the input content td1[xss_clean]=v;//assign content to td1 var td2=row.cells[2]; td2[xss_clean] = ''; } trade name number operation Beautiful durable super wear-resistant sofa two-piece set 24 That's all for "How to use JavaScript to order Mini programs." Thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.