模态的右滚动条不会位于顶部位置

时间:2014-07-01 07:22:55

标签: javascript html

我正在使用它作为模态但右边的滚动条正在消息内容的末尾。但我希望滚动条位于消息内容的顶部位置,因此它显示来自顶部的消息。

    htp.p('<html>');
    htp.p('<head>');
    web_template.include_css_stylesheets;
    htp.p('</head>');
    htp.p('<body>');   
    htp.p('<table style="margin:0px;padding:0px;width=103%;" cellpadding=0 cellspacing=0>');
    htp.p('<tr><td> 
    <div id="scrollTable" style="width:100%; height:470px; overflow:auto;">
    <table cellspacing="0" cellpadding="0" >
    <tr>
    <td>'); 
    htp.p('<title>'||message_rec.title||'</title>');
    htp.p('<b><u>'||message_rec.title||'</u></b>');
    htp.p('<p>');
    htp.p(replace(message_rec.message_txt,chr(10),'<br>'));
    htp.p('</td><tr>
    </table>
    </div>
    </td><tr>
    </table>
    <table  style="width:100%;">');
    htp.p('<tr class="crud"><td align="right">');
    htp.p('<form>');
    htp.p('<button onclick="self.close();">Close</button>&nbsp;&nbsp;');
    htp.p('</form>');        
    htp.p('</td></tr>');
    htp.p('</table>');
    htp.p('</body>');
    htp.p('</html>');
    htp.p('<script type="text/javascript">
    document.getElementById("scrollTable").scrollTop()=0;
    document.getElementById("scrollTable").scrollRight()=0;
    </script');

0 个答案:

没有答案