CSS中如何实现分屏,或者点开一个网页时打开两个网页
发布网友
发布时间:2022-04-30 02:33
我来回答
共2个回答
热心网友
时间:2023-10-07 11:10
css不行,使用JavaScript的open方法即可
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function change(){
var sw=window.screen.width;
var sh=window.screen.height;
window.open('http://www.google.com','newWin1','width='+sw/2+',height='+sh+',screenX=0,screenY=0');
window.open('http://www.baidu.com','newWin2','width='+sw/2+',height='+sh+',screenX='+sw/2+',screenY=0');
}
</script>
</head>
<body>
<a href="###" onclick="change()">ddddd</a>
</body>
</html>
热心网友
时间:2023-10-07 11:11
搜一下:CSS中如何实现分屏,或者点开一个网页时打开两个网页