Because of the reasons for the need to do so, no nonsense, directly on the code, I use the GridView binding data, table is the same, because the GridView code compiled by the browser is the table. The following is the HTML code for the ASPX page:
<asp:gridview id= "gv_new" runat= "Server" autogeneratecolumns= "False" cssclass= "Tb_data"
Width= "100%" allowpaging= "True" pagesize= "emptydatatext=" did not find the relevant data! "Onpageindexchanging=" > "gv_new_pageindexchanging"
<Columns>
<asp:templatefield headertext= "Send Time" headerstyle-width= "15%" >
<ItemTemplate>
<div style= "Text-align:center;" >
<% #Eval ("Msg_date", "{0:yyyy-mm-dd HH:mm:dd}")%>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:templatefield headertext= "Send People" headerstyle-width= "80px" >
<ItemTemplate>
<div style= "text-align:center;" class= "Fsrs_num" >
<% #Eval ("Per_num")%>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:templatefield headertext= "Translated text message number" headerstyle-width= "10%" >
<ItemTemplate>
<div style= "text-align:center;" class= "Zsts_num" >
<% #Eval ("Msg_total")%>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:templatefield headertext= "Consumption sms Number" headerstyle-width= "10%" >
<ItemTemplate>
<div style= "text-align:center;" class= "Xiaofei" >
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:boundfield datafield= "Msg_num" headertext= "remaining text message number" headerstyle-width= "" ></asp:BoundField>
</Columns>
</asp:GridView>
The next step is the jquery code:
<script type= "Text/javascript" >
$ (function () {
$ ("#gv_new tr"). each (function () {
var FSRS = $ (this). Find (". Fsrs_num");
var Sdts = $ (this). Find (". Zsts_num");
$ (this). Find (". Xiaofei"). Text ((parseint (Fsrs.text ()) * parseint (Sdts.text ()));
});
});
</script>
Don't forget to quote jquery Kochhar, I didn't write it out here.
Summary: I was "fsrs_num" is the definition of the ID, and then the result is not, in the group asked, said the best with the class, not prone to error, the results are satisfactory, the results are as follows:
How to multiply the values of the first and second columns in a table and then assign values to the third column