我找到了一个解决方案:var form = ctx.form;var field = form.addField({ id: 'custpage_code', type: 'inlinehtml', label: 'Code'});field.defaultValue = '<script>' + 'document.getElementById("resetter").style.display = "none";' + 'document.getElementById("tdbody_resetter").style.display = "none";' +// removed the extra line along the button '</script>';