动态表单制作问题

来源:百度知道 编辑:UC知道 时间:2024/06/13 00:26:25
一个很简单的问题,就是一个"输入框" 一个"提交"按扭 .....
比如我输入 123
打开 www.xxx.com/123.htm
比如我输入 234
打开 www.xxx.com/234.htm
....以此类推``
能在HTML直接运行的,希望能提供完整的代码,不用ASP类型

<Script language="Javascript">

function Open(){
var URL=document.getElementById("URL").value
if (URL=="" || URL=="网址为空!"){
document.getElementById("URL").value="网址为空!";
document.getElementById("URL").style.color="red";
document.getElementById("URL").style.backgroundColor="#FFFF90";
}else{
URL="http://www.×××.com/"+URL+".htm";
window.open(URL,"_self");
}
}
</Script>
<input type="text" name="URL" id="URL" onFocus="this.style.color='';this.style.backgroundColor='';this.value='';">
<input type="Button" value="提交" onClick="Javascript:Open();">

我来搞定!确定文件存在,就可以打开了!
<html>
<head>