JS全選,反選,取消

//全選  function chkall(){ var len=document.form1.elements.length;    var i;    for(i=0;i<len;i++)    {        if(document.form1.elements[i].type=="checkbox")   //checkbox控制項        {            document.form1.elements[i].checked=true;        }    }

圖片以二進位的形式儲存到資料庫並讀取

//定義Byte[]類型Byte[] fileData;private void bindPic()    {        if (picFile.PostedFile.FileName != "")        {            FileInfo fi = new FileInfo(Server.MapPath(labImg.Text.ToString()));            if (fi.Exists)                fi.Delete();       

jquery全選

  $(function(){       $("#parent").click(function(){         $("[name=child]:checkbox").attr("checked",$(this).attr("checked"));       }) //刪除提示 $("#btnDelete").click(function(){ if($("[name=child]:checkbox:checked").length==0){alert("請您選擇要刪除的資料!");

JS取目前時間

 <script language="javascript">var d = new Date()var vYear = d.getFullYear()var vMon = d.getMonth() + 1var vDay = d.getDate()var h = d.getHours(); var m = d.getMinutes(); var se = d.getSeconds(); s=vYear+(vMon<10 ? "0" + vMon :

圖片的上傳前的預覽

不會在這裡面上傳檔案所以就發源碼了,在網上找到的。 使用(jquery-1.4.2.min.js,uploadPreview.js,ImgFile.js)uploadPreview.js(function($) {    jQuery.fn.extend({        uploadPreview: function(opts) {            opts = jQuery.extend({                width: 0,                height:

jquery動態添加table和行

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title></title>    <script src="JS/jquery-1

jquery雙擊進行編輯

 <html>    <head>        <title>Edit content</title>    </head>    <style>    </style>    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>    <script>    $(function() {    

jquery a.js調用b.js的方法

在a.js中加入 $(function () {    //引入 b.js檔案    var js_element = document.createElement("script"); //這句是建立一個script標籤    js_element.setAttribute("type", "text/javascript"); //指令碼用的是javascript    js_element.setAttribute("src", "b.js"); //script標籤中引進b.js檔案  

sql語句小結

 擷取目前時間並加100天 select CAST(GETDATE() as smalldatetime)+100  表示在year_born欄位中尋找20世紀70年代出生的人 使用"_"where year_born like '%197_%'表示在year_born欄位中尋找1971---1974年 使用"[  ]"where year_born like '%197[1-4]%'表示在year_born欄位中尋找1975---1979年 使用"[^  ]"where year_born

repeater 取的ID

 function Show(id) {    var aid = $("#" + id).attr("id");    var isProc = $("#" + id + " span").text();    var procuser = $("#name" + id + " span").text();    //alert($('#Nav1_labName').text()); return;    if (isProc == "否") {       

sqlhelper+aspnetpager+repeater預存程序分頁

sqlhelper.cs public DataTable TabPageQuery(string sql, SqlParameter[] paras, CommandType ct)    {        DataTable dt = new DataTable();        SqlCommand cmd = new SqlCommand();        using (SqlConnection conn = new SqlConnection(sqlHelper.conn))  

jQuery擷取動態產生checkboxlist的value值

 jQuery擷取checkboxlist的value值CheckboxList是伺服器控制項,綁定資料容易,伺服器端擷取選中值也容易。但是產生的靜態頁面沒有ListItem的Value值,所以預設情況下用js在頁面中是取不到ListItem的值的。問題描述:js取不到選中的ListItem的值。 <asp:CheckBoxListrunat="server"ID="listTest"></asp:CheckBoxList><inputtype="button"id

excel大量匯入資料庫

後台代碼: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Data.SqlClient;using System.Data.OleDb;using System.IO;public partial class

預存程序分頁2

預存程序: create PROCEDURE [dbo].[proc_SplitPage]  -- ============================================= -- Description:    分頁,用到了ROW_NUMBER() -- ============================================= @tblName   varchar(255),       -- 表名 @strFields varchar(1000) = '*'

SET XACT_ABORT { ON | OFF }

 SET XACT_ABORT { ON | OFF } 2011-05-23 09:40文法SET XACT_ABORT { ON | OFF }注釋當 SET XACT_ABORT 為 ON 時,如果執行 Transact-SQL 陳述式產生執行階段錯誤,則整個事務將終止並復原。當 SET XACT_ABORT 為 OFF 時,有時只復原產生錯誤的 Transact-SQL 陳述式,而事務將繼續進行處理。如果錯誤很嚴重,那麼即使 SET XACT_ABORT 為 OFF,也可能復原整個事務。

取datatable的列

方法//將讀取的資料放到table中        public static DataTable ExectueTable(string strSQL)        {           using (SqlConnection constr = new SqlConnection(conn))            {                //執行個體DataTalbe                DataTable dt = new DataTable();        

在網頁中匯入檔案的幾種方式

1、<iframe src='' frameborder='0' scrolling='no'></iframe>2、<!-- #include file = "MessageInfo/kefuliuyan.html" -->3、<%Server.Execute("檔案路徑"); %>(這個用於aspx檔案)4、<div style="width:998px; display:none;" id="Msgs" ></div>

jquery load()編碼問題

  $.ajax({                    type: "post",                    url: "OrderInfo/OrderInfo.ashx?id=" + Math.random(),                    data: {  orderaddr: escape(orderaddress.val()), ordertype: ordertype.val(), order: "order" },                   

調用天氣預報WebService

添加引用:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx.cs代碼: WeatherWebServiceSoap w = new WeatherWebServiceSoapClient("WeatherWebServiceSoap");        protected void Page_Load(object sender, EventArgs e)        {            if

調用根據IP查看城市WebService

添加引用:http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx.cs代碼  //IP查詢省市        protected void BindIP(string strIP)        {           IpAddressSearchWebServiceSoap IpSearch = new

總頁數: 61357 1 .... 15987 15988 15989 15990 15991 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.