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

 

posted @ 2017-06-22 17:22  万里冰封  阅读(2275)  评论(0编辑  收藏  举报