js設置html區域隱藏和顯示


1 if(message != "指派")
2  {
3     document.getElementById("appoint").style.display="none";
4 
5  }else{
6     document.getElementById("appoint").style.display="inline";
7  }

上面是,javascript代碼,下面是html代碼:

 1 <!-- 選擇指派人-->
 2 <div id="appoint">
 3 
 4 <label>指派給:</label>
 5 <select name="assignedTo" id="assignedTo">
 6   <option value="未選擇" selected >選擇指派人</option>
 7          @foreach($userList as $user)
 8                   <option value="{{$user->name}}">{{$user->name}}</option>
 9          @endforeach
10 </select>
11 </div>

轉載:http://www.cnblogs.com/unpolishedgem/p/3247098.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM