87,907
社区成员
发帖
与我相关
我的任务
分享
<SCRIPT>
sm=1;
function addRow(){
sm++;
if(sm>2) {sm--;alert("You can not do this!"); return false;}
var row = document.getElementById("r"+sm);
row.style.display='block';
}
function deleteRow(){
if(sm<2) {alert("You can not do this!"); return false;}
var cln = document.getElementById("b"+sm);
var row = document.getElementById("r"+sm);
cln.value="";
row.style.display='none';
sm--;
}
</SCRIPT>
<form action="search.php" target="_blank" method="get"> <table align = "center" width=98%>
<tr id="r1"><td align = "center" width="20%"> </td>
<td align = "center"width="27%">
<select name="a1" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b1" /></td>
<td align = "center" width="23%">
<input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="deleteRow()"></td>
</tr>
<tr id="r2" style="display:none">
<td align = "center" width="20%"><input type="radio" name="c2" value ="and" checked />and
<input type="radio" name="c2" value ="or" />or</td>
<td align = "center"width="27%"><select name="a2" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b2" /> </td>
<td align = "center" width="23%">
<input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="addRow
()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-"
onClick="deleteRow()"></td>
</tr>
</table></form>
<!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>
</head>
<body>
<SCRIPT>
sm=1;
function addRow(){
sm++;
if(sm>2) {sm--;alert("You can not do this!"); return false;}
var row = document.getElementById("r"+sm);
row.style.display='block';
}
function deleteRow(){
if(sm<2) {alert("You can not do this!"); return false;}
var cln = document.getElementById("b"+sm);
var row = document.getElementById("r"+sm);
cln.value="";
row.style.display='none';
sm--;
}
</SCRIPT>
<table align = "center" width=98%>
<td align = "center">
<input type="button" style="WIDTH: 30px" name="addRow" value=" + " onClick="addRow()">
<input type="button" style="WIDTH: 30px" name="deleteRow" value=" - " onClick="deleteRow()"></td>
</table><br><br><br><br>
<form action="search.php" target="_blank" method="get"> <table align = "center" width=98%>
<tr id="r1"><td align = "center" width="20%"> </td>
<td align = "center"width="27%"><select name="a1" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b1" /></td>
<td align = "center" width="23%"><input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="deleteRow()"></td>
</tr>
<tr id="r2" style="display:none">
<td align = "center" width="20%"><input type="radio" name="c2" value ="and" checked />and
<input type="radio" name="c2" value ="or" />or</td>
<td align = "center"width="27%"><select name="a2" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b2" /> </td>
<td align = "center" width="23%">
<input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="deleteRow()"></td>
</tr>
<tr><td align = "center" colspan=3>
<input type="submit" style="WIDTH: 65px" name="submit" value ="Search" />
<input type="reset" style="WIDTH: 65px" name="reset" value ="Reset" />
</td>
</tr>
</table></form>
</body>
</html>
<html:form>
<html:submit value="提交1" />
<input type="button" name="btnSubmit" value="提交2" onclick="this.form.submit()">
</html:form>
<!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>
</head>
<body>
<SCRIPT>
var sm=1;
function addRow(){
sm++;
if(sm>2) {sm--;alert("You can not do this!"); return false;}
var row = document.getElementById("r"+sm);
row.style.display='block';
}
function deleteRow(){
if(sm<2) {alert("You can not do this!"); return false;}
var cln = document.getElementById("b"+sm);
var row = document.getElementById("r"+sm);
cln.value="";
row.style.display='none';
sm--;
}
</SCRIPT>
<table align = "center" width=98%>
<td align = "center">
<input type="button" style="WIDTH: 30px" name="addRow" value=" + " onClick="addRow()">
<input type="button" style="WIDTH: 30px" name="deleteRow" value=" - " onClick="deleteRow()"></td>
</table><br><br><br><br>
<table align = "center" width=98%>
<td align = "center">
<input type="button" style="WIDTH: 30px" name="addRow" value=" + " onClick="addRow()">
<input type="button" style="WIDTH: 30px" name="deleteRow" value=" - " onClick="deleteRow()"></td>
</table><br><br><br><br>
<form action="search.php" target="_blank" method="get">
<table align = "center" width=98%>
<tr id="r1"><td align = "center" width="20%"> </td>
<td align = "center"width="27%"><select name="a1" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b1" /></td>
<td align = "center" width="23%"><input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="window.addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="window.deleteRow()"></td>
</tr>
<tr id="r2" style="display:none">
<td align = "center" width="20%"><input type="radio" name="c2" value ="and" checked />and
<input type="radio" name="c2" value ="or" />or</td>
<td align = "center"width="27%"><select name="a2" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b2" /> </td>
<td align = "center" width="23%">
<input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="window.addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="window.deleteRow()"></td>
</tr>
<tr><td align = "center" colspan=3>
<input type="submit" style="WIDTH: 65px" name="submit" value ="Search" />
<input type="reset" style="WIDTH: 65px" name="reset" value ="Reset" />
</td>
</tr>
</table>
</form>
</body>
</html>
<!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>
</head>
<body>
<SCRIPT>
sm=1;
function addRow(){
sm++;
if(sm>2) {sm--;alert("You can not do this!"); return false;}
var row = document.getElementById("r"+sm);
row.style.display='block';
}
function deleteRow(){
if(sm<2) {alert("You can not do this!"); return false;}
var cln = document.getElementById("b"+sm);
var row = document.getElementById("r"+sm);
cln.value="";
row.style.display='none';
sm--;
}
</SCRIPT>
<table align = "center" width=98%>
<td align = "center">
<input type="button" style="WIDTH: 30px" name="addRow" value=" + " onClick="addRow()">
<input type="button" style="WIDTH: 30px" name="deleteRow" value=" - " onClick="deleteRow()"></td>
</table><br><br><br><br>
<table align = "center" width=98%>
<td align = "center">
<input type="button" style="WIDTH: 30px" name="addRow" value=" + " onClick="addRow()">
<input type="button" style="WIDTH: 30px" name="deleteRow" value=" - " onClick="deleteRow()"></td>
</table><br><br><br><br>
<form action="search.php" target="_blank" method="get">
<table align = "center" width=98%>
<tr id="r1"><td align = "center" width="20%"> </td>
<td align = "center"width="27%"><select name="a1" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b1" /></td>
<td align = "center" width="23%"><input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="deleteRow()"></td>
</tr>
<tr id="r2" style="display:none">
<td align = "center" width="20%"><input type="radio" name="c2" value ="and" checked />and
<input type="radio" name="c2" value ="or" />or</td>
<td align = "center"width="27%"><select name="a2" style="width: 100%"><?php echo displayoption()?></select></td>
<td align = "center" width="30%"><input type="text" size="70%" name="b2" /> </td>
<td align = "center" width="23%">
<input type="button" style="WIDTH: 20px" name="addRow" value="+" onClick="addRow()">
<input type="button" style="WIDTH: 20px" name="deleteRow" value="-" onClick="deleteRow()"></td>
</tr>
<tr><td align = "center" colspan=3>
<input type="submit" style="WIDTH: 65px" name="submit" value ="Search" />
<input type="reset" style="WIDTH: 65px" name="reset" value ="Reset" />
</td>
</tr>
</table>
</form>
</body>
</html>