<html>
<head>
<script type="text/javascript" >
function doEdit(){
var value1 = document.frm.input1.value;
if(value1 == "hidden"){
html = "<input type='hidden' name='input2'>";
}else if(value1 == "text"){
html = "<input type='text' name='input2'>";
}
document.all.aa.innerHTML = html;
document.frm.input1.value = "";
document.frm.input1.focus();
}
</script>
</head>
<body>
<form name="frm">
<table>
<tr>
<td><input type="text" name="input1"></td>
<td><div id="aa"><input type="text" name="input2"></div></td>
<td><input type="button" name="btn" value="submit" onclick="doEdit();" /></td>
</tr>
</table>
</form>
</body>
</html>
<head>
<script type="text/javascript" >
function doEdit(){
var value1 = document.frm.input1.value;
if(value1 == "hidden"){
html = "<input type='hidden' name='input2'>";
}else if(value1 == "text"){
html = "<input type='text' name='input2'>";
}
document.all.aa.innerHTML = html;
document.frm.input1.value = "";
document.frm.input1.focus();
}
</script>
</head>
<body>
<form name="frm">
<table>
<tr>
<td><input type="text" name="input1"></td>
<td><div id="aa"><input type="text" name="input2"></div></td>
<td><input type="button" name="btn" value="submit" onclick="doEdit();" /></td>
</tr>
</table>
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货