run
Signature.run()
功能说明
执行盖章操作
参数
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
options | Object | 是 | 可配置属性参考:options属性。 |
options属性
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
protectedItems | Array | 设置定位页面DOM的id,自动查找ID,自动获取保护DOM的kg-desc属性作为保护项描述,value属性为保护数据。不设置,表示不保护数据,签章永远有效 | |
position | String | 定位元素ID | |
moveable | Boolean | true | 签章是否可以移动 |
autoCert | Boolean | false | 是否做数字签名 |
okCall | Function | 点击确定后的回调方法,this为签章对象。调用getSignatureid获取签章ID,调用getSignatureData获取签章数据,必须设置 | |
cancelCall | Function | 点击取消后的回调方法 |
返回值
无
代码
signatureCreator.run({ protectedItems:[ ‘item1’, ‘item2’, ‘item3’ , ‘item4’ ], position: $(that).attr(‘pos’), autoCert:true, okCall: function() { console.log("‘" + this.getSignatureid() + "‘:’" + this.getSignatureData() + "’"); }, cancelCall : function() {//点击取消后的回调方法 console.log("取消!") } });