javascript - Table scrollbar without changing headers and provide sorting in headers -


Here's mytable and the headers need to stay in, while the result is only scrollbar and sorting by name Provides convenience.

  & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; Id & lt; / TD & gt; & Lt; TD & gt; Name & lt; / TD & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt;% while (resultSet.next ()) {%> & Lt; TR & gt; & Lt; TD & gt; & Lt;% = resultSet.getString (1)%> & Lt; / TD & gt; & Lt; TD & gt; & Lt;% = resultSet.getString (2)%> & Lt; / TD & gt; & Lt; TD & gt; & Lt;% = resultSet.getString (3)%> & Lt; / TD & gt; & Lt; / TR & gt; & Lt;%}% & gt; & Lt; / Table & gt;  

For the scrollbar, I tried to use the div but, it showed the empty space.

How can I do these two things?

Try:

  & lt; Table height = "500" style = "overflow-y: scroll;" & gt;  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -