Edit D:\xinhaisoft\crisis_new\Scripts\jquery.jformfill.js
??/* * ???????????? * ?????(QQ33080907) * ????????2019.04.21 * ?????????????????????????????????? */ // ???: // $('form').formfill(json) /* global UE */ (function ($) { 'use strict' $.fn.formfill = function (json) { if ($.type(json) === 'string') { // JSON????????????????????json.replace(/\n/g,'').replace(/\"/g,'\\"')??????????? json = JSON.parse(json) } // ????????son?????????????????? if (!$.isEmptyObject(json)) { // console.log(json) return this.each(function () { $(this).find('input[name],select[name],textarea[name]').each(function () { var $this = $(this) var tag = this.tagName.toLowerCase() var name = $this.attr('name').toLowerCase() var v = json[name] // ??????????? if (v !== null && typeof (v) !== 'undefined') { v = v.toString() if (v === '') { return } if (tag === 'input') { var type = $this.attr('type').toLowerCase() // ???? if (type === 'radio') { $this.prop('checked', $this.val() === v) } // ???? else if (type === 'checkbox') { var value = $this.val() if ((',' + v + ',').indexOf(',' + value + ',') >= 0) { $this.prop('checked', true) } else { $this.prop('checked', false) } } // ?????? else if (type === 'date') { this.valueAsDate = new Date(Date.parse(v)) } // AmazeUI???????? else if (this.hasAttribute('data-am-datepicker')) { $this.datepicker('setValue', v) } // ?????? else { $this.val(v) } } // UEditor else if ($(this).hasClass('ueditor')) { var ue = UE.getEditor($(this).data('id')) ue.ready(function () { ue.setContent(v) }) } // ????????? else if ($this.hasClass('editor')) { var id = $this.data('editor') var txt = v.replace(/\\n/g, '') // wangEditor???????????????id????? if (editor[id]) { editor[id].txt.html(txt) } else { $this.val(txt) } } // ?????? else if (tag === 'select') { // ??????? if (this.hasAttribute('multiple')) { $this.val(v.split(',')) } // AmazeUI?????????? else if (this.hasAttribute('data-am-selected')) { $this.val(v).trigger('changed.selected.amui') } // ???????????data????????????change???visibly????????? else { $this.val(v).data('value', v).trigger('change') } } // ?????? else { $this.val(v.replace(/\\n/g, '\n')) autosize.update(this) } } }) }) } } })(jQuery)
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de