Ok, I have a table with two rows. On the first row, I can input text in it, and when I click a button, the text automatically appears in the second row.

The problem is that when I input a text that is too long or too large for the table, then press the button, the second row will not use scrollbars, even though I use overflow:scroll and set the width and height of the td. Instead, it will make the table expand.

What is the right method to use to make the second row use scrollbars?

What version of DOCTYPE do you use? Did you put the DOCTYPE in your HTML? Use div instead of table. It will make you comfortable and solve your problem. Here is example.

<div id="first-row">
This is the first.<a href="javascript:show()">Show content</a>
<div id="second">
This content will show when you click a link or button placed above div.

#second {
        overflow: auto;
        height: 66px;
        max-height: 66px; /* IE ignore this declaration */
        display: block

Good luck..