導航:首頁 > 編程語言 > jsp頁面中隱藏

jsp頁面中隱藏

發布時間:2023-07-10 03:17:27

jsP頁面如何實現按鈕隱藏

判斷是否還有下一條數據,如專果沒有,調用屬hidebutton()。

② JSP中如何實現頁面的隱藏

html display=hidden 就可以了。 不過這個要看你的html頁面的實際情況了。註:這個和jsp應該是沒有關系的,提問請不要帶jsp。

③ jsp怎麼在有條件下控制按鈕的隱藏和顯示

  1. 可以在js中隱藏

    var status =${resourceDemand.status};

    if(status >=2){ document.getElementById("view").display="none"}

  2. 或者使用java代碼

    <% int status = resourceDemand.status;

    if(status <2){%>

    <input id="view" type="button" value=" 查 看 " onclick="doView('url')"/>
    <%}%>


都可以實現,望採納。。謝謝

④ jsp頁面顯示隱藏div

可以試試如下方法:

資料庫xxb有registration表,有這樣的欄位

name idnumber work_order

甲一 12345678 a

乙二 12121212 b

丙三 13131313 c

丁四 11111111 b

jsp頁面有一個輸入框,一個查詢按鈕,三個DIV,DIV的id分別為a,b,c,默認三個DIV都隱藏,當輸入甲一,點擊查詢後,從資料庫里查詢得到甲一的work_order值,然後提交回本頁面,頁面下方就會顯示相應id的DIV框,其他兩個依然隱藏。

⑤ jsp中的下拉框怎麼隱藏其中的某一項

可以用js來控制選中其中某一項,其他隱藏。
思路:當選中一個下拉框並執行js代碼後,其他的下拉框值全隱藏。

<div>
<select id="dept" name="dept" class="select" style="display:none">
<option value="">請選擇</option>
<%
ResultSet getDeptRs = db.executeQuery("select t.dept,t.deptname from pub_dept_manager t where unit='"+cua.getUnitCode()+"' and parentcode='"+cua.getUnitCode()+"'");
while(getDeptRs.next()){
if(keyvalue.equals(getDeptRs.getString(2)))
out.print("<option value='"+getDeptRs.getString(2)+"' selected>"+getDeptRs.getString(2)+"</option>");
else
out.print("<option value='"+getDeptRs.getString(2)+"'>"+getDeptRs.getString(2)+"</option>");
}
getDeptRs.close();
%>
</select>
</div>

<script language="JavaScript">
//查詢跳轉
var keyvalue = "<%=keyvalue%>";
var yearvalue = "<%=yearvalue%>";
var year ="<%=year%>";
//根據選擇不同的查詢條件,顯示輸入關鍵字的文本框或者下拉框
function showNext(){
if ( year =="currentyear"){
//從上個頁面傳過的year值不為空,且為字元串"currentyear"
yearvalue = "<%=currentYear%>";
}
var selectvalue = document.form1.field.options[document.form1.field.selectedIndex].value;
myDiv.innerHTML='<table cellpadding="0" cellspacing="0" border=0><tr><td>'
+'關鍵字: <input size="15" name="keyvalue" type="text" id="keyvalue" title="請輸入要查找的關鍵字" value="'+keyvalue+'">'
+'</td><td> 年份:'
+'<input size="6" name="yearvalue" type="text" des="年份" id="yearvalue" maxlength="4" dtype=year title="請輸入要查找的年份" value="'+yearvalue+'"></td>'
+'<td><a href="javascript: query();" class="main_fun_button" >查詢</a></td></tr></table>';

//角色類別
if(selectvalue == "DEPTNAME"){
myDiv.innerHTML='<table cellpadding="0" cellspacing="0" border=0><tr><td>'
+'關鍵字:<select id="keyvalue" name="keyvalue" class="select" >'+document.all.dept.innerHTML
+'</select></td><td> 年份:'
+'<input size="10" name="yearvalue" type="text" des="年份" id="yearvalue" maxlength="4" dtype=year title="請輸入要查找的年份" value="'+yearvalue+'"></td>'
+'<td><a href="javascript: query();" class="main_fun_button" >查詢</a></td></tr></table>';
}
keyvalue="";
yearvalue ="";
if(document.form1.keyvalue!=null)
document.form1.keyvalue.focus();
}
</script>

⑥ 在jsp中如何讓文本框隱藏和顯示

<script>
function changes(){
if(document.getElementById("test1").style.display="none"){
document.getElementById("test1").style.display="";
}else{
document.getElementById("test1").style.display ="none";
}
}
</script>
<span id="test1" style="display:none">
<input type="text" id="uname" name="uname" />
</span>
<input type="button" name="test" onclick="changes();"/>

閱讀全文

與jsp頁面中隱藏相關的資料

熱點內容
ps3文件分割視頻 瀏覽:280
微信圖片一鍵轉發軟體 瀏覽:331
如何判斷s200plc編程電纜 瀏覽:691
太原編程培訓班哪個好 瀏覽:171
樹葉吹奏教程 瀏覽:6
社交app帶來了哪些社會問題 瀏覽:394
如何安裝愛寶8800數據採集器 瀏覽:712
文件保存了怎麼找不到了 瀏覽:476
彩票網站怎麼辨真假 瀏覽:840
pr找不到該文件 瀏覽:963
java移除panel 瀏覽:354
jsp填充jsp 瀏覽:166
海關外貿大數據在哪裡查 瀏覽:381
思特奇java筆試題 瀏覽:121
葫蘆俠在手機中的文件名 瀏覽:813
plc編程應該怎麼收錢 瀏覽:584
c語言中源文件由什麼組成 瀏覽:890
linuxhttpdphp配置文件 瀏覽:607
拆單數據要怎麼保存 瀏覽:17
mac電腦怎樣壓縮文件到100m 瀏覽:645

友情鏈接