原创 withThreshold(float threshold)與withPrefixLength(int prefixLength)方法

根據測試: (1)發現threshold越小,匹配的越多,反之相當於不模糊匹配如(threshold值越接近1); (2)發現prefixLength越大,匹配越少,極大沒有測試過,一般爲0就表示模糊查詢

原创 spring mvc 經典講解

跟開濤學SpringMVC 目錄彙總,請訪問下面鏈接 http://jinnianshilongnian.iteye.com/blog/1752171

原创 el表達式保留兩位小數、使用jstl 標籤保留兩位小數

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <fmt:formatNumber type="number" value="${688.87 * 0.

原创 JSTL 跳出循環

今天用到了 JSTL 的 forEach 標籤循環遍歷一個集合,在這個循環內寫了一個 <c:if> 標籤,當滿足某個條件的時候要終止循環,但是標籤裏不能使用 break,那怎麼樣終止循環呢?且看下面的代碼: <c:forEach var

原创 JQuery給iframe添加html

<iframe id="qrcode-iframe" name="submitIframe" src="about:blank" > </iframe> <script> $(function() {

原创 js實現下拉框聯動選中日期(select 日期聯動更改)

html代碼 <head> <script type="text/javascript" src="/js/jquery-1.11.1.min.js" ></script> <script type="text/javascript"

原创 jquery 獲取和設置Select選項常用方法總結

1.獲取select 選中的 text: $("#cusChildTypeId").find("option:selected").text(); $("#cusChildTypeId option:selected").text()

原创 設置 select 選中值不可改動,即只讀

用個浮動層蓋住select不給操作就行,另外給 select 加上了一個 οnfοcus="this.blur();", 防止客戶用鍵盤來修改值。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0

原创 jsp頁面中,el表達式獲取list長度

在jsp頁面中不能通過${list.size}取列表長度,而是 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib prefix="fn

原创 jQuery實現表格行的動態增加與刪除

效果圖如下: 刪除之前 <img alt="" src="http://www.blogjava.net/images/blogjava_net/absolutedo/d1.png" border="0" height="244" wi

原创 net.sf.json.JSONException: There is a cycle in the hierarchy! 異常

問題: net.sf.json.JSONException: There is a cycle in the hierarchy!  at net.sf.json.util.CycleDetectionStrategy$StrictCy

原创 select標籤單選多選詳解

select元素可創建單選或多選菜單。當提交表單時,瀏覽器會提交選定的項目,或者收集用逗號分隔的多個選項,將其合成一個單獨的參數列表,並且在將 <select>表單數據提交給服務器時包括 name屬性。 一、基本用法: <select>

原创 jquery判斷checkbox是否選中

html頁面中複選框代碼 <td>&nbsp;&nbsp;<input type="checkbox" title="是否默認" id="gradeIsDefaultAddInput" name="gradeisDefault"/>&n

原创 jQuery選擇器總結

<span style="font-size:18px;">jQuery 的選擇器可謂之強大無比,這裏簡單地總結一下常用的元素查找方法 $("#myELement") 選擇id值等於myElement的元素,id值不能重複在文檔

原创 清空瀏覽器文件選擇框中的值(清空 file input 的值)

火狐中如下 $("#fileInputId").prop("value","");IE中如下 var fileInput = $("#fileInputId"); fileInput.replaceWith(fileInput.clone