答案:hi 兄弟 你的30分我预定了行么? 。。。 先占个座,一会儿把代码再贴上来。。哈哈。。稍等。
----------------
<html>
<head>
<script type="text/javascript">
function doit(){
for(var i=1;i<99;i++){
var startStr = "";
if(document.getElementById("start"+i)!=null)
startStr = document.getElementById("start"+i).value;
if(startStr!=""){
for(var j=1;j<99;j++){
var endStr = "";
if(document.getElementById("end"+j)!=null)
endStr = document.getElementById("end"+j).value;
if(endStr!=""){
var oneUrl = "http://" + startStr + "/" + endStr;
window.open(oneUrl);
}
}
}
}
}
</script>
</head>
<body>
请输入前半部分:<br/>
<input type="text" id="start1" name="start1" value=""/><br/>
<input type="text" id="start2" name="start2" value=""/><br/>
<input type="text" id="start3" name="start3" value=""/><br/>
<input type="text" id="start4" name="start4" value=""/><br/>
<input type="text" id="start5" name="start5" value=""/><br/>
<input type="text" id="start6" name="start6" value=""/><br/>
<input type="text" id="start7" name="start7" value=""/><br/>
<input type="text" id="start8" name="start8" value=""/><br/>
<input type="text" id="start9" name="start9" value=""/><br/>
<hr/>
请输入后半部分:<br/>
<input type="text" id="end1" name="end1" value=""/><br/>
<input type="text" id="end2" name="end2" value=""/><br/>
<input type="text" id="end3" name="end3" value=""/><br/>
<input type="text" id="end4" name="end4" value=""/><br/>
<input type="text" id="end5" name="end5" value=""/><br/>
<input type="text" id="end6" name="end6" value=""/><br/>
<input type="text" id="end7" name="end7" value=""/><br/>
<input type="text" id="end8" name="end8" value=""/><br/>
<input type="text" id="end9" name="end9" value=""/><br/>
<input type="button" value="确定" onclick='doit()' />
</body>
</html>
其他:<html>
<head>
<title>test</title>
<script type="text/javascript">
openWin(arg1){
targetHtml = document.getElementById("url").value + "/" + arg1;
window.open (targetHtml);
}
</script>
</head>
<body>
<input type="text" id="url" value=""/>
<input type="button" value="确定" onclick='openWin("aaaa")' />
</body>
</html>
上一个:能不能在html中书写只让ie6执行,别的浏览器忽略的html代码?
下一个:问下HTML表单