>  기사  >  웹 프론트엔드  >  Jquery의 LigerUI를 분석하여 파일 upload_jquery를 구현하는 방법

Jquery의 LigerUI를 분석하여 파일 upload_jquery를 구현하는 방법

WBOY
WBOY원래의
2016-05-16 17:29:191346검색
1. 헤드
< ; script src="../lib/js/ligerui.expand.js" type="text/javascript">

2. Html의 Div 코드

<%--Upload-Single--%>
">
아이콘:

아이콘:
                                                                                                             ~         너비:200px" id="fileupload" name="fileupload"/>
                                                  




3. 라고 적힌 부분이 핵심입니다. LigerUI를 아는 친구들 - 아시죠


1. 그리드에 [주소 필드 저장] 항목 추가

{ 표시: "스캔", 이름 : "AppendBillPath", width: 120, type: "text", align: "left" }
2. 양식에 항목을 추가할 수 있습니다. [주소 및 팝업 선택 상자 저장]
                                    ~                                           AppendBillPath ",omboboxName: "AppendBillPath2", newline: true, labelWidth: 100, width: 150, space: 30, type: "select", options: {}} // --Upload-[6]--
$ .ligerui.get("AppendBillPath2").set('onBeforeOpen', f_selectAppendBillPath_1) // [스캔본] // --Upload-[7]--

이벤트
// #region ======================================= [스캔문서 업로드 창] / / --Upload-[8]--



코드 복사

코드는 다음과 같습니다.

var AppendBillPathDetail = null;
function f_selectAppendBillPath_1() {
var imageurl = $("#AppendBill").val();
var AppendBill_Id = $("#AppendBill") .val(); // 주문번호
    if (imageurl.length == 0) {
     LG.showError("주문번호를 입력하지 않으셨습니다. 운송장번호를 입력해주세요!");
                                                                                                         else {
                                                              
                              > ~ >                   ;
                          // var filehelpcode = $("# filehelpcode").val();
var extend = imgurl.substring(imgurl.lastIndexOf("."), imgurl.length);
extend = extend.toLowerCase();
        if (extend = = ".jpg" || 확장 == ".jpeg" || 확장 == ".gif" || 확장 == ".bmp")
                                  ~
}
var imageurl = $("#AppendBill").val(); // 확장
Alert(imageurl);
$.ajaxFileUpload({
        url: "../handle/ImageUpload .aspx ?imageurl=" imageurl, // --Upload-[9]-- aspx file
secureuri: false,
fileElementId: "fileupload", //파일 ID 입력
dataType: "text" ,
                                                                                                   ~     ​").val(Data);

LG.tip(data);
f_reload();
},
오류: 함수(data, status , e ) {
LG.showError(데이터);
                                                                      ; Server.MapPath("/Image/" gfilename filenameext); // 업로드 작업 수행
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.