jQuery自適應輪播圖插件Swiper用法示例
1264
2024-02-20
前臺代碼:
<link rel="stylesheet" type="text/css" /> <script src="http://www.gimoo.net/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script> <script src="http://www.gimoo.net/Scripts/jquery-ui.js" type="text/javascript"></script>
function PoeviewExcel() { $.ajax( { url: "send/index", type: "post", success: function (data) { var divshow = $("#showInfo2"); divshow.text("");// 清空數據 divshow.append(data); // 添加Html內容,不能用Text 或 Val divshow.dialog({ title: "短信群發系統", height: 250, width: 580 }); } } ); return false; }
<a onclick="return PoeviewExcel()">預覽數據</a> <div id="divPreview" style="display: none"> <text id="showInfo2"></text> </div>
后臺(主要):
public string GetImportReport() { DataTable dt = this.ImportExcel(); string content = String.Empty; content = @"<table width='550' border='0' cellspacing='0' cellpadding='0' bgcolor='#D2D2D2'>" + " <tr bgcolor='#336699'>" + " <td align='center'><strong>序號</strong></td>" + " <td align='center'><strong>目標手機號</strong></td>" + " <td align='center'><strong>發送內容</strong></td>" +"</tr>"; for (int i = 0; i < dt.Rows.Count; i++) { content += "<tr>" + " <td width='50' align='center'>" + i.ToString()+"</td>" + " <td width='150' align='center'>" + dt.Rows[i][0].ToString() + "</td>" + " <td width='150' >" + dt.Rows[i][1].ToString() + "</td>" + " </tr>"; } content += "</table>"; return content; }
說明:
divshow.append(data); // 添加Html內容,不能用Text 或 Val
當然用 after();會在該div中不斷追加信息。
如果用Text:顯示加載的文本內容;
如果用Val:點擊鏈接第一次為空窗口,再點擊才出現數據顯示、
以上這篇用jQuery向div中添加Html文本內容的簡單實現就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持綠夏網。
#免責聲明#
本站[綠夏技術導航]提供的一切軟件、教程和內容信息僅限用于學習和研究目的;不得將上述內容用于商業或者非法用途,否則,一切后果請用戶自負。本站信息來自網絡收集整理,版權爭議與本站無關。您必須在下載后的24個小時之內,從您的電腦或手機中徹底刪除上述內容。如果您喜歡該程序或內容,請支持正版,購買注冊,得到更好的正版服務。我們非常重視版權問題,如有侵權請郵件[admin@lxwl520.com]與我們聯系進行刪除處理。敬請諒解!