js在html标签中参数无效解决方案

来源:互联网 发布:贵金属喊单软件 编辑:程序博客网 时间:2024/05/21 10:35

最近在写extjs,在js在html中定义js方法传入参数时参数无效,这类问题大多时候就是没有转义,转义一下单引号或者双引号就可以了

{            header : '操作',            dataIndex : 'pmStaffInformation.staffid',            renderer : function(value, metaData, record, rowIndex, colIndex, store){                var staffnameText = record.json.pmStaffInformation.staffname;                var formaldateText = Ext.util.Format.date(new Date(record.json.pmStaffInformationDetails.formaldate), 'Y-m-d');                return "<a style='color: #0C7BE2;' href='#' onclick='win("+value+",\""+staffnameText+"\",\""+formaldateText+"\")'>转正办理</a>"; }


阅读全文
0 0
原创粉丝点击