<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    飛舞的幻想

    常用鏈接

    統計

    Google Adsense

    Zanox FWHX

    花個明白

    最新評論

    Struts下jsp頁面的一些特殊小功能以及查詢語句經常犯錯誤

    1、? jsp 頁面的保留字問題(主要是表格的問題)

    < TABLE class = "border" >

    < TBODY >

    ?????? < TR >

    ?????? < TD >

    < P class = "title" >< bean:message key = "RoomRent.insert.title" /></ P >

    < html:errors />

    < bean:write name = "roomTotalRentForm"

    property = "message" filter = "false" />

    < DIV class = "tab-pane" >

    < DIV class = "tab-page" >

    < DIV class = "tab" >< bean:message key = "RoomRentData.add" /></ DIV >

    < TABLE border = "1" width = "100%" >

    ??? < TBODY >

    < TH nowrap align = "left" >< bean:message key = "RoomRentData.length" /></ TH >

    < TD >< html:text property = 'roomrentData.length' size = "20"

    maxlength = "20" styleId = "length" onblur = "checkLength(length10,20,' ')" ></ html:text ></ TD >

    < TH nowrap align = "left" >< bean:message key = "RoomRentData.width" /></ TH >

    < TD >< html:text property = 'roomrentData.width' size = "20"

    maxlength = "20" styleId = "width" onblur = "checkLength(width10,20,' ')" ></ html:text ></ TD >

    < TH nowrap align = "left" >< bean:message key = "RoomRentData.area" /></ TH >

    < TD >< html:text property = 'roomrentData.area' size = "20"

    maxlength = "20" styleId = "area" onclick = "getArea()" onblur = "checkLength(area,20,' 面積 ');getArea()" ></ html:text ></ TD >

    </ TR >

    < TR >

    < TD colspan = "6" align = "center" nowrap >< html:button

    property = "Save" onclick = "toSave()" styleClass = "button" >

    < bean:message key = "dataEdit.saveEdit" />

    </ html:button >

    < html:button property = "Return" onclick = "toReturn()"

    styleClass = "button" >

    < bean:message key = "dataEdit.return" />

    </ html:button ></ TD >

    </ TR >

    </ TBODY >

    </ TABLE >

    </ DIV >

    </ DIV >

    </ TD >

    </ TR >

    ??? </ TBODY >

    </ TABLE >

    上面的代碼邏輯和語法上沒任何錯誤,但是在 css 樣式顯示的時候, <TH> 可以正常顯示樣式可 <TD> 就不可以。原因是 <TD> 中出現了關鍵字 length width 直接使的定義的樣式不能正常顯示。

    2、? 多表關聯查詢

    Select new rent.data.RoomTotalRentData(rtr.rentId,rtr.roomId, rm.builderId,rm.unit,rm.floor,rm.room,rtr.rentRoomArea,rtr.balconyUseArea,rtr.roomType, rtr.roomDirectiond1.dictItemName,d2.dictItemName,hb.buildName)from pub.data.RoomTotalRent as rtr, pub.data.SysDictItem as d1, pub.data.SysDictItem as d2,.pub.data.HouseBuilding as hb, pub.data.RoomMng as rm , pub.data.operator as op where rtr.roomType=d1.dictItemId and d1.dictId='000212' and rtr.roomDirection=d2.dictItemId and d2.dictId='000210' and rm.roomId=rtr.roomId and rm.builderId=hb.buildId

    可以保證 rent.data.RoomTotalRentData 里面即 vo 里面有這個構造函數,而且字典,關聯也都沒有錯誤。可是在查詢出來的結果卻有沒有達到效果。原因就是關聯了 pub.data.operator 表但是沒有使用這個條件。所以結果就是查詢的符合條件的記錄關聯 pub.data.operator 表中的記錄。

    3、? 單選按鈕控制文本框的隱藏和顯示

    ? 就是選中一個 radio 就顯示一個文本框 選中另外的就顯示另外的文本框沒有顯示的就隱藏

    使用 tr style.display 控制顯示和隱藏的。不多說了,看代碼吧!

    Js 代碼

    function setDisplay()

    {?? with (document.forms[0])

    ?? ? {if (document.forms[0].subsideStatment[0].checked==1) {

    ??????????? ? document.all( 'costRenth' ).style.display= "" ;

    ??????????? } else

    ??????????? { document.all( 'costRenth' ).style.display= "none" ;

    ??? ???????? }if (document.forms[0].subsideStatment[1].checked==1)

    ?????????? { document.all( 'rlevelRenth' ).style.display= "" ;

    ??????????? }else

    ??????????? { document.all( 'rlevelRenth' ).style.display= "none" ;

    ??????????? } if (document.forms[0].subsideStatment[2].checked==1)

    ???????????? { document.all( 'levelRenth' ).style.display= "" ;

    ?? ????????? }else

    ?? ?????????{ document.all( 'levelRenth' ).style.display= "none" ;

    ?? ????????? }

    }

    }

    Jsp 代碼

    < TR >

    < TH nowrap align = "left" >< bean:message key = "RoomTotalRentData.subsideStatment" /> < font color = "red" > * </ font ></ TH >

    < TD colspan = "7" >< html:radio property = "data.subsideStatment"

    value = "213001" styleId = "subsideStatment" onclick = "setDisplay()" onblur = "setDisplay()" >< bean:message key = "RoomTotalRentData.subsideStatment.all" />

    </ html:radio > < html:radio property = "data.subsideStatment"

    value = "213002" styleId = "subsideStatment" onclick = "setDisplay()"

    onblur = "setDisplay()" >< bean:message key = "RoomTotalRentData.subsideStatment.part" /></ html:radio > < html:radio property = "data.subsideStatment" value = "213003" styleId = "subsideStatment" onclick = "setDisplay()" onblur = "setDisplay()" >< bean:message key = "RoomTotalRentData.subsideStatment.no" />

    </ html:radio ></ TD >

    </ TR >

    < TR id = "costRenth" style = "display:none" >

    < TH nowrap align = "left" >< bean:message key = "RoomTotalRentData.costRent" /></ TH >

    < TD colspan = "7" >< html:text property = "data.costRent" styleId = "costRent" size = "10" maxlength = "20" onblur = "checkLength(costRent,20,' 成本租金 ');isNum(costRent,' 成本租金 ')" ></ html:text >

    </ TD >

    </ TR >

    < TR id = "rlevelRenth" style = "display:none" >

    < TH nowrap align = "left" >< bean:message key = "RoomTotalRentData.rlevelRent" /></ TH >

    < TD colspan = "7" >< html:text property = "data.rlevelRent" styleId = "rlevelRent" size = "10" maxlength = "20"

    onblur = "checkLength(rlevelRent,20,' 準成本租金 ');isNum(rlevelRent,' 準成本租金 ') " ></ html:text >

    </ TD >

    </ TR >

    < TR id = "levelRenth" style = "display:none" >< TH nowrap align = "left" >< bean:message key = "RoomTotalRentData.levelRent" /></ TH >

    < TD colspan = "7" >< html:text property = "data.levelRent"

    styleId = "levelRent" size = "10" maxlength = "20 onblur = "checkLength(levelRent,20,' 基準租金 ');isNum(levelRent,' 基準租金 ') " ></ html:text >

    </ TD >

    </ TR >

    4、? 下拉列表顯示和隱藏文本框

    ? 同單選按鈕

    Js 代碼

    function casCade()

    {if (document.forms[0].roomType.value== "212001" )

    ??? { document.all( 'totalFloorb' ).style.display= "none" ;

    ??? document.all( 'totalFloort' ).style.display= "none" ;

    ??? document.all( 'roomDirectionc' ).colSpan=6;

    ?? }if (document.forms[0].roomType.value== "212002" )

    ??? { document.all( 'totalFloorb' ).style.display= "" ;

    ?? ? document.all( 'totalFloort' ).style.display= "" ;

    ??? document.all( 'roomDirectionc' ).colSpan=1;

    ?? }

    }

    Jsp 代碼

    < TD id = "roomDirectionc" colspan = "6" >< html:select property = "data.roomDirection" styleId = "roomDirections" styleClass = "iform" onclick = "casCade()" >

    < html:option value = "" />

    < html:options collection = "roomDirectionList"

    property = "dictItemId" labelProperty = "dictItemName" />

    </ html:select ></ TD >

    < TH nowrap align = "left" id = "totalFloorb" style = "display:none" >< bean:message

    key = "RoomTotalRentData.totalFloor" /></ TH >

    < TD colspan = "3" id = "totalFloort" style = "display:none" >< html:text

    property = "data.totalFloor" styleId = "totalFloor" size = "10" maxlength = "20" onblur = "checkLength(totalFloor,20,' 樓房總樓層 ');isInt(totalFloor,' 樓房總樓層 ')" readonly = "true" ></ html:text ></ TD >

    5、? xp 下面可以裝 sql2000 。方法是:先進入 sql 的安裝光盤找到 msde 目錄,里面有個 setup ,安裝后重啟一遍系統就會發現已經有了服務管理器了,然后在照常安裝 sql2000 就可以了。這樣安裝后的 sql 就和在服務器上安裝的 sql 一樣了。

    6、? 一個在線的 DHTML 參考手冊 http://www.phpx.com/man/dhtmlcn/ 什么屬性一查就知很方便的

    7、? 一個在線的 Javascipt 中文手冊 http://man.ddvip.com/web/JScriptzhref/index.html

    ?

    posted on 2006-05-17 18:06 飛舞的幻想 閱讀(2493) 評論(0)  編輯  收藏 所屬分類: 框架學習

    主站蜘蛛池模板: 日韩视频在线观看免费| 国产精品亚洲精品日韩已满| 日日麻批免费40分钟无码| 亚洲1区2区3区精华液| 亚洲美女一区二区三区| 亚洲熟妇丰满多毛XXXX| 国产在线19禁免费观看| 国产1024精品视频专区免费| 伊人久久免费视频| a级特黄毛片免费观看| jizz免费在线观看| 欧美亚洲精品一区二区| 亚洲乱码在线观看| 亚洲人成片在线观看| 日本久久久久亚洲中字幕| 亚洲精品美女久久777777| 国产精品亚洲w码日韩中文| 热99re久久精品精品免费| 无码一区二区三区免费视频| 亚洲网站免费观看| 99在线观看免费视频| 久久亚洲免费视频| 国产激情免费视频在线观看| 在线涩涩免费观看国产精品| 97在线视频免费公开视频| 亚洲一区二区三区免费| 一级毛片免费视频网站| xvideos永久免费入口| 成年免费a级毛片| 一级做α爱过程免费视频| 免费视频成人国产精品网站| 免费人成网上在线观看| 一个人晚上在线观看的免费视频| 一级女性全黄生活片免费看| fc2成年免费共享视频网站| 国产免费黄色无码视频| 中文字幕无码毛片免费看| 免费无码又爽又刺激高潮软件| 国精产品一区一区三区免费视频| 国产午夜免费高清久久影院| 最近中文字幕免费2019|