泛微E9 添加测试按钮
<script>
var lx = WfForm.convertFieldNameToId("lx","detail_1");
var xmm = WfForm.convertFieldNameToId("xmm","detail_1");
function getMyBt() {
Dialog.alert("点击成功");
}
jQuery(document).ready(function(){
debugger;
var html = "<input style='overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 200px;color:white' class='ant-btn ant-btn-primary' title='功能测试' value='功能测试' type='button' οnclick='getMyBt(this)'/>";
jQuery("#getMyBt").html(html);
})
</script>
<style>
.ant-btn:hover{
background-color: blue;
}
</style>
注意:我们需要给添加按钮的单元格设置id属性,方便添加CSS样式,操作方法:右击单元格–>“设置自定义属性“–>设置id属性–>”保存“。