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

熱點內容
網路評選一般有哪些 瀏覽:476
2021三支一扶報名數據在哪裡看 瀏覽:914
網路未備案怎麼打得開 瀏覽:987
計算機程序用什麼編程語言 瀏覽:324
linux入門常用命令 瀏覽:497
江寧區哪裡有數控編程培訓 瀏覽:778
java寫一個shape形狀類 瀏覽:744
win7如何設置word背景顏色 瀏覽:484
如何創造電腦編程語言 瀏覽:56
昂達平板電腦圖形密碼忘記怎麼辦 瀏覽:92
組織文件內容是什麼 瀏覽:183
0基礎如何學習智能編程 瀏覽:366
java程序員全攻略下載 瀏覽:715
網路逆向教程 瀏覽:135
iso文件如何重裝系統 瀏覽:750
ghost鏡像文件路徑如何恢復 瀏覽:832
搭建網站需要多少錢啊 瀏覽:599
編程貓怎麼設置背景亮度 瀏覽:177
qq文件破損 瀏覽:414
javapoi配置 瀏覽:608

友情鏈接