code: function (elem,value) {
              if (typeof value === "undefined") {
                  return elem && elem.nodeType === 1 && typeof elem.value !== "undefined" ? elem.value :undefined;
              }
              // 将value转化为string
              value = value == null ? "" :value + "";
              elem.value = value;
          }
docs: 设置值