<input type="hidden" name="UserID" id="UserID" value="<%=CurrentUser.UserID %>" />
<input type="hidden" name="headimg" id="headimg" value="<%=CurrentUser.HeadImgLoc %>" />
<input type="hidden" name="headimgurl" id="headimgurl" value="<%=Sysconfig.ImgUrl %>" />
<div class="head-portrait-buyt">
<div class="file-head">
<input type="file" class="gnhu" name="HeadImgLoc" id="HeadImgLoc" οnchange='uploadImg(this)'/> <!-- 不要runat-->
<a href="javascript:;" class="file-buyty">选择图像</a>
</div>
<div class="nuyu">支持jpg、jpeg、gif、png、bmp格式,且照片小于10M</div>
</div>
<div class="portrait-vgy"><img src="/theme/default/image/personal/txd.jpg" id="preview"/></div>
<div class="portrait-liyu">
<div class="name">图片预览</div>
<div class="pott-120">
<img src="/theme/default/image/personal/tx1.jpg" id="preview1"/>
<p>120px*120px</p>
</div>
<div class="pott-80">
<img src="/theme/default/image/personal/tx2.jpg" id="preview2"/>
<p>80px*80px</p>
</div>
<div class="pott-45">
<img src="/theme/default/image/personal/tx3.jpg" id="preview3"/>
<p>45px*45px</p>
</div>
<div class="clear"></div>
<a href="javascript:;" class="port-buyty" id="saveBtn">保 存</a>
</div>
</form>
<script type="text/javascript">
$("#saveBtn").click(function () {
var vs = Easy.Form.getValues(Easy.get("headImgForm"));
vs.form = Easy.get("headImgForm"); //获取一下form
Jade.upload("User+", "UpdateHeadImg", vs, function (d) { //用upload而非ajax
if (d && !d.exception) {
Jade.Msg.alert("修改成功!", function (s) {
if (s && !s.exception) {
location.href = location.href;
}
});
}
else {
Jade.Msg.error(d.message);
}
});
});
</script>