zoukankan      html  css  js  c++  java
  • c# 上传图片+时间日历

     1     <script type="text/javascript">
     2     $(document).ready(function () {
     3         $('.dateinput').datepicker();       
     4         });
     5 
     6         $('#uploader1').FileUpload({
     7             'subfolder': 'Disaster',
     8             'callback': function (msg) {
     9                 //msg.url为图片地址
    10                 $("#photo1").val(msg.url);
    11                 $("#preview1").popover({ trigger: 'hover', html: true, placement: 'right ', content: "<img src='" + getBaseUrl(msg.url) + "'/>" });
    12 
    13                 $('#photo1').attr("servername", msg.url);
    14                 $("#ReportPicPath").val($('#photo1').attr("servername") + "#" + $('#photo2').attr("servername"));
    15             }
    16         });
    17 
    18         $('#uploader2').FileUpload({
    19             'subfolder': 'Disaster',
    20             'callback': function (msg) {
    21                 //msg.url为图片地址
    22                 $("#photo2").val(msg.url);
    23                 $("#preview2").popover({ trigger: 'hover', html: true, placement: 'right ', content: "<img src='" + getBaseUrl(msg.url) + "'/>" });
    24 
    25                 $('#photo2').attr("servername", msg.url);
    26                 $("#ReportPicPath").val($('#photo1').attr("servername") + "#" + $('#photo2').attr("servername"));
    27             }
    28         });
    29     </script>
     1  <div class="control-group">
     2                 <label class="control-label"><span class="required">*</span>地灾点地址:</label>
     3                 <div class="controls">
     4                    @Html.DropDownList("MineDisasterInfId", ViewBag.AllAddress as SelectList, new { @class = "m-wrap medium" })
     5                 </div>
     6             </div>
     7 
     8             <div class="control-group">
     9                     <label class="control-label"><span class="required">*</span>巡查日期:</label>
    10                     <div class="controls">
    11                         @Html.TextBoxFor(m => m.ReportTime, "{0:yyyy-MM-dd}", new { @class = "m-wrap large dateinput" })
    12                         <span class="help-inline">@Html.ValidationMessageFor(m => m.ReportTime)</span>
    13                     </div>
    14                 </div>
    15 
    16             <div class="control-group">
    17                 <label class="control-label"><span class="required">*</span>巡查描述:</label>
    18                 <div class="controls">
    19                     @Html.TextAreaFor(m => m.ReportDesc, new { @class = "m-wrap large" })
    20                     <span class="help-inline">@Html.ValidationMessageFor(m => m.ReportDesc)</span>
    21                 </div>
    22             </div>
    23 
    24             <div class="control-group">
    25                 <label class="control-label"><span class="required">*</span>巡查照片:</label>
    26                 <div class="controls">
    27                     @Html.TextBoxFor(m => m.ReportPicPath, new { @class = "m-wrap large",@style = "display:none"  })
    28                     
    29                     <div class="input-append">                      
    30                         <input id="photo1" class="m-wrap large" type="text" servername="">
    31                         <span class="add-on" title="预览" id="preview1"><i class="icon-picture"></i></span>
    32                     </div>
    33                     <div id="uploader1"></div>
    34 
    35                     <div class="input-append">
    36                         <input id="photo2" class="m-wrap large" type="text" servername="">
    37                         <span class="add-on" title="预览" id="preview2"><i class="icon-picture"></i></span>
    38                     </div>
    39                     <div id="uploader2"></div>
    40 
    41                     <div id="fileQueue"></div>
    42                     <span class="help-inline">@Html.ValidationMessageFor(m => m.ReportPicPath)</span>
  • 相关阅读:
    SVN:cannot map the project with svn provider解决办法
    项目管理工具_maven的配置
    servlet,过滤器,监听器,拦截器的区别
    索引
    事务的隔离级别和传播行为
    jbpm工作流
    Hibernate---进度1
    java——反射
    HttpClient
    TCP和UDP并实现socket的简单通信
  • 原文地址:https://www.cnblogs.com/ceccf/p/5794951.html
Copyright © 2011-2022 走看看