不知道这样是不是,呵呵:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="javascript">
function split(){
document.body.innerHTML = [
"<iframe style='width:100%;height:50%' src='http://www.163.com'></iframe>",
"<iframe style='width:100%;height:50%' src='http://www.sohu.com'></iframe>"
].join("<br />");
}
</script>
</head><body><input type="button" value="button" onclick="split();" />
</body>
</html>
<html>
<head>
<title>Untitled</title>
<script language="javascript">
function split(){
document.body.innerHTML = [
"<iframe style='width:100%;height:50%' src='http://www.163.com'></iframe>",
"<iframe style='width:100%;height:50%' src='http://www.sohu.com'></iframe>"
].join("<br />");
}
</script>
</head><body><input type="button" value="button" onclick="split();" />
</body>
</html>
<input type='button' value='Go!' onclick='seprateIt();'>
<div id='con'></div>
</BODY>
</HTML>
<script>
function seprateIt()
{
var imgSrc = 'http://images.google.cn/intl/zh-CN_ALL/images/images_res.gif';
var con = document.getElementById('con');
var ntable = document.createElement('TABLE');
ntable.setAttribute("border", 1);
ntable.setAttribute("width", 600);
ntable.setAttribute("height", event.screenY); var parts = 3; for (var i=0; i<parts; i++ )
{
var nrow = ntable.insertRow();
var ncell = nrow.insertCell();
var ntxt = document.createElement("TEXTAREA");
ntxt.value = "content"+i;
var img = new Image();
img.src = imgSrc;
ncell.appendChild(img);
ncell.appendChild(ntxt);
}
con.appendChild(ntable);
return true;
}</script>