當前位置:首頁 » 文件管理 » ligerui上傳圖片

ligerui上傳圖片

發布時間: 2022-11-15 16:11:52

❶ 如何實現Jquery的LigerUI文件上傳

實現Jquery的LigerUI文件上傳的實現方法:
1、在head標簽中加入js引用:
<script src="../lib/js/ajaxfileupload.js" type="text/javascript"></script>
<script src="../lib/js/ligerui.expand.js" type="text/javascript"></script>
2、定義上傳表格:
<div id="AppendBill_Div" style="display:none;"> <%-- 上傳表單 --%>
<table style="height:100%;width:100%">
<tr style="height:40px">
<td style="width:20%">
圖標:
</td>
<td><input type="file" style="width:200px" id="fileupload" name="fileupload"/>
</td>
</tr>
</table>
3、編寫上傳的js邏輯
1、grid中添加項【存地址欄位】
{ display: "掃描件", name: "AppendBillPath", width: 120, type: "text", align: "left" }
2、Form可添加項【存地址和彈出選擇框】
{ name: "AppendBillPath1", type: "hidden" },
{ display: "掃描件", name: "AppendBillPath", comboboxName: "AppendBillPath2", newline: true, labelWidth: 100, width: 150, space: 30, type: "select", options: {}}
$.ligerui.get("AppendBillPath2").set('onBeforeOpen', f_selectAppendBillPath_1)
3、事件
// #region ======================================= 【上傳掃描件窗口】
var AppendBillPathDetail = null;
function f_selectAppendBillPath_1() {
var imageurl = $("#AppendBill").val();
var AppendBill_Id = $("#AppendBill").val(); // 單號
if (imageurl.length == 0) {
LG.showError("您沒有輸入單號,請輸入隨單號!");
return;
}
if (AppendBillPathDetail) {
AppendBillPathDetail.show();
}else {
AppendBillPathDetail = $.ligerDialog.open({
target: $("#AppendBill_Div"), title: '添加圖標',
width: 360, height: 170, top: 170, left: 280, // 彈出窗口大小
buttons: [
{ text: '上傳', onclick: function () { AppendBillPath_save(); } },
{ text: '取消', onclick: function () { AppendBillPathDetail.hide(); } }
]
});
}
}

❷ ASP.NET點擊一個按鈕怎麼讓LigerUI窗口顯示到frameset框架的最上面

指定好LigerUI頁面的targer就可以了

❸ jquery上傳文件是怎麼實現的

本篇文章是對Jquery中的LigerUI實現文件上傳的方法,進行了分析介紹,需要的朋友可以參考下
一、在Head中加入
<script src="../lib/js/ajaxfileupload.js" type="text/javascript"></script>
<script src="../lib/js/ligerui.expand.js" type="text/javascript"></script>
二、Html中的Div代碼

復制代碼 代碼如下:
<div id="AppendBill_Div" style="display:none;"> <%-- 上傳 - 單 --%>
<table style="height:100%;width:100%">
<tr style="height:40px">
<td style="width:20%">
圖標:
</td>
<td><input type="file" style="width:200px" id="fileupload" name="fileupload"/>
</td>
</tr>
</table>
</div>

三、Js中-寫的是關鍵部分,會LigerUI的朋友-你懂得
1、grid中添加項【存地址欄位】
{ display: "掃描件", name: "AppendBillPath", width: 120, type: "text", align: "left" }
2、Form可添加項【存地址和彈出選擇框】
{ name: "AppendBillPath1", type: "hidden" }, // --上傳-【5】--
{ display: "掃描件", name: "AppendBillPath", comboboxName: "AppendBillPath2", newline: true, labelWidth: 100, width: 150, space: 30, type: "select", options: {}} // --上傳-【6】--
$.ligerui.get("AppendBillPath2").set('onBeforeOpen', f_selectAppendBillPath_1) // 【掃描件】 // --上傳-【7】--
3、事件
// #region ======================================= 【上傳掃描件窗口】 // --上傳-【8】--
復制代碼 代碼如下:
var AppendBillPathDetail = null;
function f_selectAppendBillPath_1() {
var imageurl = $("#AppendBill").val();
var AppendBill_Id = $("#AppendBill").val(); // 單號
if (imageurl.length == 0) {
LG.showError("您沒有輸入單號,請輸入隨單號!");
return;
}
if (AppendBillPathDetail) {
AppendBillPathDetail.show();
}
else {
AppendBillPathDetail = $.ligerDialog.open({
target: $("#AppendBill_Div"), title: '添加圖標',
width: 360, height: 170, top: 170, left: 280, // 彈出窗口大小
buttons: [
{ text: '上傳', onclick: function () { AppendBillPath_save(); } },
{ text: '取消', onclick: function () { AppendBillPathDetail.hide(); } }
]
});
}
}
function AppendBillPath_save()
{
var imgurl = $("#fileupload").val();
// var filehelpcode = $("#filehelpcode").val();
var extend = imgurl.substring(imgurl.lastIndexOf("."), imgurl.length);
extend = extend.toLowerCase();
if (extend == ".jpg" || extend == ".jpeg" || extend == ".png" || extend == ".gif" || extend == ".bmp")
{
}
else
{
LG.showError("請上傳jpg,jpep,png,gif,bmp格式的圖片文件");
return;
}
var imageurl = $("#AppendBill").val(); // extend
alert(imageurl);
$.ajaxFileUpload({
url: "../handle/ImageUpload.aspx?imageurl=" + imageurl, // --上傳-【9】-- aspx文件
secureuri: false,
fileElementId: "fileupload", //Input file id
dataType: "text",
success: function (data, status)
{
// ----------------- // 保存路徑
// $("#AppendBillPath2").val(Data);

LG.tip(data);
f_reload();
},
error: function (data, status, e) {
LG.showError(data);
}
});
}
// #endregion

四、後台cs,寫一句關鍵的,可以返回參數,前台提示
string url = Server.MapPath("/Image/" + gfilename + filenameext); // 執行上傳操作

❹ 如何實現Jquery的LigerUI文件上傳

獲取jQuery集合的某一項
對於獲取的元素集合,獲取其中的某一項(通過索引指定)可以使用eq或get(n)方法或者索引號獲取,要注意,eq返回的是jquery對象,而get(n)和索引返回的是dom元素對象。對於jquery對象只能使用jquery的方法,而dom對象只能使用dom的方法,如要獲取第三個<div>元素的內容。有如下兩種方法:
$("div").eq(2).html(); //調用jquery對象的方法
$("div").get(2).innerHTML; //調用dom的方法屬性
2
集合處理功能
對於jquery返回的集合內容無需我們自己循環遍歷並對每個對象分別做處理,jquery已經為我們提供的很方便的方法進行集合的處理。
包括兩種形式:
$("p").each(function(i){this.style.color=['#f00','#0f0','#00f'][ i ]})
//為索引分別為0,1,2的p元素分別設定不同的字體顏色。
3
支持方法的連寫
所謂連寫,即可以對一個jquery對象連續調用各種不同的方法。連寫代碼風格估計是jQuery最有特色之一了。
例如:
$("p").click(function(){alert($(this).html())})
.mouseover(function(){alert('mouse over event')})
.each(function(i){this.style.color=['#f00','#0f0','#00f'][ i ]});
4
操作元素的樣式
主要包括以下幾種方式:
$("#msg").css("background"); //返回元素的背景顏色
$("#msg").css("background","#ccc") //設定元素背景為灰色

END
網路經驗:jingyan..com
學習jQuery該注意哪些
1
學習jQuery,要自己寫代碼,深入到開發中鍛煉,理論結合實際,才會提升價值,不斷的去實踐,不斷在實際代碼中找出他們的規律,發現他們的原理,以及他們之間相互的關系,才能提升jQuery,才能理解jQuery的精髓。

❺ 請問在以後公司上班需要用到jquery的什麼插件

UI:

jquery.HooRay

jqueryUI

jQueryEasyUI

jQueryLigerUI

對話框:

artDialog

AsyncBox

jBox

lhgDialog

表單驗證:

jquery-validate

jQueryformValidator

放大鏡:

cloudzoom

圖片查看:

jquery.fancybox

樹狀結構:

JQueryzTree

JQueryTreeview

焦點圖:

myFocus

soChange

AnythingSlider

jquery.raty

Tab:

idTabs

麵包屑導航:

jBreadCrumb

Tip:

colortip

分頁:

jPaginate

上傳:

jUploader

基於HTML5的可預覽多圖片Ajax上傳

❻ 如何實現Jquery的LigerUI文件上傳

  1. 在Head中加入
    <script src="../lib/js/ajaxfileupload.js" type="text/javascript"></script>
    <script src="../lib/js/ligerui.expand.js" type="text/javascript"></script>

  2. Html中的Div代碼
    <div id="AppendBill_Div" style="display:none;"> <%-- 上傳 - 單 --%>
    <table style="height:100%;width:100%">
    <tr style="height:40px">
    <td style="width:20%">
    圖標:
    </td>
    <td><input type="file" style="width:200px" id="fileupload" name="fileupload"/>
    </td>
    </tr>

    </table>

    </div>

  3. Js中-寫的是關鍵部分,會LigerUI的朋友-你懂得
    1、grid中添加項【存地址欄位】
    { display: "掃描件", name: "AppendBillPath", width: 120, type: "text", align: "left" }
    2、Form可添加項【存地址和彈出選擇框】
    { name: "AppendBillPath1", type: "hidden" }, // --上傳-【5】--
    { display: "掃描件", name: "AppendBillPath", comboboxName: "AppendBillPath2", newline: true, labelWidth: 100, width: 150, space: 30, type: "select", options: {}} // --上傳-【6】--
    $.ligerui.get("AppendBillPath2").set('onBeforeOpen', f_selectAppendBillPath_1) // 【掃描件】 // --上傳-【7】--
    3、事件
    // #region ======================================= 【上傳掃描件窗口】 // --上傳-【8】--

    var AppendBillPathDetail = null;
    function f_selectAppendBillPath_1() {
    var imageurl = $("#AppendBill").val();
    var AppendBill_Id = $("#AppendBill").val(); // 單號
    if (imageurl.length == 0) {
    LG.showError("您沒有輸入單號,請輸入隨單號!");
    return;
    }

    if (AppendBillPathDetail) {
    AppendBillPathDetail.show();

    }
    else {

    AppendBillPathDetail = $.ligerDialog.open({
    target: $("#AppendBill_Div"), title: '添加圖標',
    width: 360, height: 170, top: 170, left: 280, // 彈出窗口大小
    buttons: [
    { text: '上傳', onclick: function () { AppendBillPath_save(); } },
    { text: '取消', onclick: function () { AppendBillPathDetail.hide(); } }
    ]
    });
    }
    }

    function AppendBillPath_save()
    {

    var imgurl = $("#fileupload").val();
    // var filehelpcode = $("#filehelpcode").val();
    var extend = imgurl.substring(imgurl.lastIndexOf("."), imgurl.length);
    extend = extend.toLowerCase();
    if (extend == ".jpg" || extend == ".jpeg" || extend == ".png" || extend == ".gif" || extend == ".bmp")
    {
    }
    else
    {

    LG.showError("請上傳jpg,jpep,png,gif,bmp格式的圖片文件");

    return;
    }
    var imageurl = $("#AppendBill").val(); // extend
    alert(imageurl);

    $.ajaxFileUpload({
    url: "../handle/ImageUpload.aspx?imageurl=" + imageurl, // --上傳-【9】-- aspx文件
    secureuri: false,
    fileElementId: "fileupload", //Input file id

    dataType: "text",
    success: function (data, status)
    {

    // ----------------- // 保存路徑

    // $("#AppendBillPath2").val(Data);

    LG.tip(data);
    f_reload();
    },
    error: function (data, status, e) {
    LG.showError(data);

    }
    });

    }
    // #endregion

  4. 、後台cs,寫一句關鍵的,可以返回參數,前台提示
    string url = Server.MapPath("/Image/" + gfilename + filenameext); // 執行上傳操作

❼ 請問ligerUI中設置了frozen: true這一屬性後,把表格的列固定在了表格的左側,怎麼才能固定在右側

蠟燭有心還惜別,替人垂淚到天明。

❽ ligerUI中ligerDialog和ligerWindow的區別

從API來看,它們之間視乎沒有根本性的區別,下面看對比圖,


$.ligerDialog.open=function(p)
{
//實例化一個l.controls.Dialog對象
//內部可以追述到第33行,使用liger.run()函數構造Dialog實例
return$.ligerDialog(p);
};
$.ligerDialog.close=function()
{
//根據Dialog類型查到到所有的dialog實例對象
vardialogs=l.find(l.controls.Dialog.prototype.__getType());

//循環每一個dialog實例並銷毀
for(variindialogs)
{
vard=dialogs[i];
d.destroy.ligerDefer(d,5);
}

//隱藏遮罩層
//在ligerUI中,所有的窗口使用的是一個全局的mask
//相關代碼可以看js/core/base.js598行
l.win.unmask();
};
$.ligerDialog.show=function(p)
{
vardialogs=l.find(l.controls.Dialog.prototype.__getType());
if(dialogs.length)
{
for(variindialogs)
{
//如果已經存在dialog實例,那麼就直接使用實例對象
//顯示已存在的dialog,並返回
dialogs[i].show();
return;
}
}

//如果不存在dialog實例,則初始化一個實例並返回
return$.ligerDialog(p);
};
$.ligerDialog.hide=function()
{
vardialogs=l.find(l.controls.Dialog.prototype.__getType());

//隱藏dialog實例也是相同的方式
for(variindialogs)
{
vard=dialogs[i];
d.hide();
}
};
$.ligerDialog.tip=function(options)
{
//初始化選項參數
options=$.extend({
showType:'slide',
width:240,
modal:false,
height:100
},options||{});

$.extend(options,{
fixedType:'se',
type:'none',
isDrag:false,
isResize:false,
showMax:false,
showToggle:false,
showMin:false
});

//構造一個Dialog實例
return$.ligerDialog.open(options);
};


根據上面的代碼解讀,結論就很清晰了:

  • Dialog是一個單例對象,不建議繼承與擴展

  • Window是多例類,允許繼承並擴展


我覺得ligerUI對Window的設計沒有 Ext 設計得好,Dialog應作為Window的一個單例對象才相對合理,Ext就是這么做的。有興趣的話,可以了解下Ext,Ext是目前我認為前端UI組件化設計得最好的一個框架。

❾ ligerui 如何設置行高

點全選;在把滑鼠移動到如圖點右鍵選行高就行了

希望有用

熱點內容
萬魔斬腳本 發布:2024-10-06 08:23:18 瀏覽:876
華強北耳機連安卓手機下什麼軟體 發布:2024-10-06 08:21:53 瀏覽:251
兒科發現傳染病的應急演練腳本 發布:2024-10-06 08:21:48 瀏覽:598
玩王者榮耀的時候要買哪個配置 發布:2024-10-06 08:19:41 瀏覽:620
imovie怎麼清理緩存 發布:2024-10-06 08:14:30 瀏覽:17
python字典list 發布:2024-10-06 08:14:26 瀏覽:578
amhip訪問 發布:2024-10-06 08:03:54 瀏覽:437
joy加密 發布:2024-10-06 07:53:27 瀏覽:201
結構是由哪種腳本語言填寫的 發布:2024-10-06 07:24:27 瀏覽:744
客戶端反編譯教學 發布:2024-10-06 07:10:42 瀏覽:783