javascrpt input 自动赋值.docVIP

  • 10
  • 0
  • 约8.08万字
  • 约 8页
  • 2016-12-03 发布于河南
  • 举报
javascrpt input 自动赋值

JS(还需要jquery1.5以上版本): /** jQuery inputEvaluation Plugin * 自动给input(除file)赋值. * 好处:不用显式的页面上的input赋值,可以直接从后台传递过来json串 * 缺点:会导致form的reset的reset方法失去意义. * jquery 版本不能低于1.5 * Copyright(c) 2012 bysag * Email:zhengyun@163.com * msn:zhengyun_an@ * Version: 1.0 */ (function($){ $.fn.inputEvaluation=function(options){ if(options!=null$.trim(options).length0){ var options_json_obj ; try{ if($.type(options)==string){ options_json_obj = $.parseJSON(options); }else if($.type(options)==object||$.type(options)==array){ options_json_obj = option

文档评论(0)

1亿VIP精品文档

相关文档