Home >Web Front-end >JS Tutorial >Example tutorial of adding button to a column of easyui in js

Example tutorial of adding button to a column of easyui in js

零下一度
零下一度Original
2017-06-25 09:39:292158browse

$("#totalTb").datagrid({

columns: [[
                      ) ' ENTITY_START', title: 'Start time', width: 100, align: "center", halign: 'center' },
         { field: 'ENTITY_END', title: 'End time', width: 100, align: "center", halign: 'center' },
                                                                                                                                                                                                                                            : 'ENTITY_RATE', title: 'Physical winning rate', width: 100, align: "right", halign: 'center' },
                                 { field: 'ENTITY_NUM', title: 'Total quantity', width: 80 , align: "right", halign: 'center' },
                              { field: 'ENTITY_SEND_NUM', title: 'Quantity issued', width: 100, align: "right", halign: 'center' },
{Field: 'Entity_last_num', Title: 'The remaining quantity', width: 100, align: "right", halign: 'center'},
{
Field: 'operate', title: ' ', width: 100, align: "center", formatter: btnDetailed
                                                                                                                                                                 ​ (value, rowData, rowIndex) {
if (typeof rowData.ENTITY_NO == "string") {
return ' ';
}
}

Another: When using to add a button, when the button is clicked, the page will refresh

Use< ;input type="button" value="Details"/> The page will not be refreshed when clicking the button

or

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn