Time of Update: 2018-12-08
1.判斷select選項中 是否存在value="paravalue"的item2.向select選項中 加入一個item3.從select選項中 刪除一個item4.修改select選項中
Time of Update: 2018-12-08
Jquery的選取器很強大,對select的options對象添加的時候我找了老半天才找到 複製代碼 代碼如下:/**//* 檔案名稱:jquery.liu.select.js 功能說明:本js檔案為jquery類庫的一個外掛程式,主要實現對select的操作. 作者:John Liu 編寫日期:2008/03/12 */ //得到select項的個數 jQuery.fn.size = function() { return jQuery(this).get(0).options.length;
Time of Update: 2018-12-08
複製代碼 代碼如下:<div> <table nclick="gotClick(event,'table',this)" id="table"> <tr nclick="gotClick(event,'tr',this)" id="tr"> <td nclick="gotClick(event,'td',this)" id="td"> <input type="button" name="button" value="單擊我"
Time of Update: 2018-12-08
一般情況下都是設定body標籤的onload監聽window的load事件.但load事件是要在頁面的元素全部載入完了才觸發的,如果頁面片較多或圖片太大,就會導致初始化的代碼未被執行的時候使用者就做了其它操作了. Jquery庫提供了一個非常方便好用的函數( $(selector).ready()),讓我們可以在頁面的dom載入完後就可以做相應的操作(當然,這還得看使用者瀏覽器的支援).,而不用等待全部元素載入完成.例如: $(document).ready(function (){
Time of Update: 2018-12-08
大家可以輸入或者粘貼一些JSON資料來校正是否正確。 按Tab鍵自動全文縮排格式化。JSON 編輯器核心代碼複製代碼 代碼如下:<script type="text/javascript"><!-- /* main Object */ JE={ data:{},/* 關聯資料 */ code:false,/* 格式化後的代碼 */ oldCode:[],/* 曆史代碼 */ editUI:null,/* 關聯編輯框 */ msgUI:null,/* 資訊顯示視窗 */
Time of Update: 2018-12-08
複製代碼 代碼如下:<script type="text/javascript"> function Polygon(iSides) { this.sides = iSides; if(typeof Polygon._initialized == "undefined") { Polygon.prototype.getArea = function() { return 0; }; Polygon._initialized = true; } } function Triangle(
Time of Update: 2018-12-08
1,關於event的用法 存在問題:IE中可以直接使用event對象,但是Mozilla不可以直接使用。 例如: <input type="button" value="clickMe" nclick="doIt()"><script. language="javascript"> function doIt(){ alert(event); }</script>
Time of Update: 2018-12-08
學生表:create table student( id number(8) primary key, name varchar2(10),deptment number(8))選課表:create table select_course( ID NUMBER(8) primary key, STUDENT_ID NUMBER(8) foreign key (COURSE_ID) references course(ID), COURSE_ID NUMBER(8)
Time of Update: 2018-12-08
主要使用的有下面三種:1. (...)Grouping. Group items into a single unit that can be used with *, +, ?, |, and so on. Also remember the characters that match this group for use with later references.2. (?:...)Grouping only. Group items into a single unit, but
Time of Update: 2018-12-08
(一) MySQL: (1) JDBC驅動jar包:(http://www.mysql.com) mm.mysql-2.0.2-bin.jar (2) 驅動類classpath:Driver = org.gjt.mm.mysql.Driver (3) 資料庫連接URL: url = jdbc:mysql://IP(hostName):3306/DatabaseName. url解釋:關鍵字 jdbc mysql jdbc表示採用方式串連資料庫 mysql 表示串連到mysql資料庫 (二)
Time of Update: 2018-12-08
非常適合對資料庫操作命令不熟悉的資料庫管理者,下面我就說下怎麼安裝該工具: 1.先到網上下載phpmyadmin,再解壓到可以訪問的web目錄下(如果是虛擬空間,可以解壓後通過ftp等上傳到web目錄下),當然您可以修改解壓後該檔案的名稱。 2.配置config檔案 開啟libraries下的config.default.php檔案,依次找到下面各項,按照說明配置即可: A.訪問網址 引用: $cfg['PmaAbsoluteUri'] = '';這裡填寫phpmyadmin的訪問網址
Time of Update: 2018-12-08
本系列文章分為:基本篇、層次篇、簡單篇、內容篇、可見度篇、屬性篇、子項目篇、表單篇、表單對象屬性篇共9篇文章。 本篇講解::contains(text),:empty,:has(selector),:parent,:hidden,:visible的用法。 您對本系列文章有任何建議或意見請發送到郵箱:sjzlgt@qq.com 由於是第一次寫技術性系列文章,難免會出錯或代碼BUG,歡迎指出,在此謝過! 您可以到jQuery官網來學習更多的有關jQuery知識。
Time of Update: 2018-12-08
建立一個工程struts2工程teaweb(因為現在所做的項目是一個關於茶葉,茶文化的),匯入jar包(基本的幾個jar包:commons-logging-1.0.4.jar,freemarker- 2.3.8.jar,ognl-2.6.11.jar,struts2-core-2.0.10.jar,xwork-2.0.4.jar),配置 struts.xml配置內容如下<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE
Time of Update: 2018-12-08
時間過得好快,又被拉回js戰場時, 跨域問題這個傷疤又開疼了. 好在,有jquery幫忙,跨域問題似乎沒那麼難纏了.這次也藉此機會對跨域問題來給刨根問底,結合實際的開發項目,查閱了相關資料,算是解決了跨域問題..有必要記下來備忘. 跨域的安全限制都是指瀏覽器端來說的.伺服器端是不存在跨域安全限制的,
Time of Update: 2018-12-08
http://regexpal.com/上面這個網站可以用於線上檢測JS的Regex文法除了熟知的幾個固定字元表示位置:^ : Match the beginning of the string and, in multiline searches, the beginning of a line.$ : Match the end of the string and, in multiline searches, the end of a line. \b: Match a word
Time of Update: 2018-12-08
本系列文章分為:基本篇、層次篇、簡單篇、內容篇、可見度篇、屬性篇、子項目篇、表單篇、表單對象屬性篇共9篇文章。 您對本系列文章有任何建議或意見請發送到郵箱:sjzlgt@qq.com 由於是第一次寫技術性系列文章,難免會出錯或代碼BUG,歡迎指出,在此謝過! 線上地址 http://demo.jb51.net/html/jquery/jQuery-Selectors-2-bynet.htm xmlns="http://www.w3.org/1999/xhtml" >
Time of Update: 2018-12-08
我的學習方法:先入門,後進階!本系列文章分為:基本篇、層次篇、簡單篇、內容篇、可見度篇、屬性篇、子項目篇、表單篇、表單對象屬性篇共9篇文章。詳細介紹頁面 http://demo.jb51.net/html/jquery/jQuery-Selector.html xmlns="http://www.w3.org/1999/xhtml">
Time of Update: 2018-12-08
1.DOM上的介面基本上還是一致的,但經測試發現mozilla下的DOM更標準些,就算些法一樣,IE下會有一些微小的區別,但無關要緊 2.事件模型上,這方面區別算比較大. mozilla下的e.target 相當於 ie下的event.srcElement,但細節上有區別,後者是返回一個html element 而e.target返回的是個節點,也就是說包括文本節點,方法可以這樣 var trg = e.target;
Time of Update: 2018-12-08
--1:得到用戶端的IP地址 /************* IP **************/ declare @ip varchar(20),@hst varchar(20),@sql varchar(100) declare @str varchar(100) set @str='PING '+Host_Name() create table #tmp(aa varchar(200)) insert #tmp exec master..xp_cmdshell @str select
Time of Update: 2018-12-08
複製代碼 代碼如下:<html> <head> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> </head> <body> <input type="checkbox" name="chk_list" id="chk_list_1" value="1" />1<br /> <input