日期:2014-05-16  浏览次数:20504 次

document.getElementById获取值为null
本帖最后由 a102470 于 2013-06-28 14:48:58 编辑
 function get() {
            var input = $("#amsbasic input");
            var chl = [], title, val;
            input.each(function () {
                var title = $.trim($(this).attr('title'));
                var val = $.trim($(this).val());
                chl.push(title);
                chl.push(":");
                chl.push(val);
                chl.push("\n");
            });
           chl = chl.join("");
            var url = "@Url.Action("GetImg","AMSBasicInfo")";
            var tt = {
                "chl": chl,
                "size": 3
            };
            $.post(url,tt,function (res) {
                var pic = document.getElementById("picture");
                pic.src = res;
            });
        }

<div id="DR" class="easyui-window"  data-options="iconCls:'icon-save',modal:true,autoCenter:true" style="width:340px;height:320px;padding: 5px;" closed="true">
    <div class="easyui-layout" data-options="fit:true">
        <form id="QrCode" novalidate method="post">
            <div data-options="region:'center',split:true" style="width: 320px">