showModalDialog弹窗怎么设置滚动条自适应
时间: 2023-08-22 11:11:44 浏览: 117
根据引用\[1\]中的代码,showModalDialog弹窗的滚动条自适应可以通过设置scroll属性为auto来实现。具体代码如下:
```javascript
window.showModalDialog('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=auto, resizable=no, location=no, status=no');
```
在上述代码中,将scrollbars属性的值设置为auto,即可根据内容的高度自动显示或隐藏滚动条,实现滚动条的自适应。
#### 引用[.reference_title]
- *1* *3* [ie6与ie7 Window.Open() 和window.showModalDialog()窗体大小和刷新](https://blog.csdn.net/gulijiang2008/article/details/5148769)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [学习前端,需要掌握的单词集汇总](https://blog.csdn.net/marendu/article/details/118724522)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文