控制窗体滚动条显示的问题
当使用window.open()新开一个窗口时,怎样才能控制新窗口可以显示纵向滚动条,但不能显示横向滚动条?
在新开窗口中加如 <body style= "overflow-x:hidden;overflow-y:auto "> 这样的代码,怎么不行呢?
------解决方案--------------------2.html:
<script>
window.open( "1.html ");
</script>
1.html:
<script language= "javascript ">
</script>
<body style= "overflow-x:hidden;overflow-y:auto ">
文件内容: <textarea id= "a2 "> </textarea>
<input type= "button " value= "读文件 " onclick= "readFile() ">
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
<br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br>
</body>
打开2,然后2打开1,没有问题呀。1.html没有横向滚动条