導航:首頁 > 編程語言 > 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頁面中隱藏相關的資料

熱點內容
表格怎麼添加一行數據 瀏覽:35
旅遊網站開發怎麼選 瀏覽:669
properties文件位置 瀏覽:679
不想學編程可以做什麼 瀏覽:22
手機照片一鍵壓縮成文件 瀏覽:962
女生微信霸氣個性簽名 瀏覽:626
微博如何看別人一個月的數據 瀏覽:14
萬能小組件怎麼點擊就進入app應用 瀏覽:817
蘋果5s變形怎麼恢復 瀏覽:286
電腦里文件密碼忘了咋辦啊 瀏覽:315
輸入文件夾 瀏覽:31
extjsgrid刪除列 瀏覽:43
gdx文件怎麼打開 瀏覽:759
如何更新大數據量表 瀏覽:311
特殊量產工具 瀏覽:980
安卓網路顯示h2是什麼意思 瀏覽:90
哪個拍照app好 瀏覽:70
文件被設置隱藏屬性如何顯示 瀏覽:142
網路電視的好處 瀏覽:657
cf槍戰王者手游下載官網下載最新版本下載 瀏覽:925

友情鏈接