<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form name="form2" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><input type="checkbox" name="checkbox1" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox1.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox2" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox2.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox3" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox3.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox4" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox4.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox5" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox5.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox6" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox6.checked = 'true';"></td> </tr>
</table>
<div id="d"></div>
</form>
<p> </p>
</body>
</html>
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form name="form2" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><input type="checkbox" name="checkbox1" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox1.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox2" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox2.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox3" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox3.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox4" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox4.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox5" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox5.checked = 'true';"></td>
<td ><input type="checkbox" name="checkbox6" value="checkbox">
<input name="textfield" type="text" size="10" onfocus="checkbox6.checked = 'true';"></td> </tr>
</table>
<div id="d"></div>
</form>
<p> </p>
</body>
</html>
解决方案 »
- 在js或者jquery里面能使用el表达式吗?
- 怎样能将网页中的flash打印出来
- 谁给推荐一个基于jQuery的 treeTable插件?
- 怎么判断一个 object 是否为 dom 对象 ?
- 在firefox里面调用canvas的错误
- 为什么这样写创建不了表格????
- js求助!
- 用JS做一个弹出框。显示内容为选择性别
- js问题
- web中怎样做类似delphi中radio组或checkbox组最外面的那个框架?那个框的左上角可以写上组的名称
- vbscript里面有类似于javascript里面的eval的函数么?
- 关于<input type="file" name="upfile" />的问题,急!
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form name="form2" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><input type="radio" name="checkbox1" value="radio">
<input name="textfield" type="text" size="10" onfocus="checkbox1.checked = 'true';"></td>
<td ><input type="radio" name="checkbox2" value="radio">
<input name="textfield" type="text" size="10" onfocus="checkbox2.checked = 'true';"></td>
<td ><input type="radio" name="checkbox3" value="radio">
<input name="textfield" type="text" size="10" onfocus="checkbox3.checked = 'true';"></td>
<td ><input type="radio" name="checkbox4" value="radio">
<input name="textfield" type="text" size="10" onfocus="checkbox4.checked = 'true';"></td>
<td ><input type="radio" name="checkbox5" value="radio">
<input name="textfield" type="text" size="10" onfocus="checkbox5.checked = 'true';"></td>
<td ><input type="radio" name="checkbox6" value="radio">
<input name="textfield" type="text" size="10" onfocus="checkbox6.checked = 'true';"></td> </tr>
</table>
<div id="d"></div>
</form>
<p> </p>
</body>
</html>
复选框提交的时候是以1,4,5的形式提交。但是在后台,前台不能取得checkbox的value。只能判断它是否被选中。
function setfocus()
{
document.form1.ing.focus();
}
</script>
<script language="javascript">
var j=0
function add_row(){
k=j+1
j=sqd.rows.length;
newRow=document.all.sqd.insertRow(-1)
newcell=newRow.insertCell()
newcell.style.backgroundColor='#f7f7f7'
newcell.innerHTML=j
newcell=newRow.insertCell()
newcell.style.backgroundColor='#f7f7f7'
newcell.innerHTML="<input name=Number type=radio >"
newcell=newRow.insertCell()
newcell.style.backgroundColor='#f7f7f7'
//*************************update************************************
newcell.innerHTML="<input name=Marking type=text class=INPUT1 size=30 style=font-size: 20px; font-weight: bold onblur='onBlurValue()'>"
//**************************end**************************************
newcell=newRow.insertCell()
newcell.style.backgroundColor='#f7f7f7'
newcell.innerHTML="<input name=price type=text class=INPUT1 size=20 style=font-size: 20px; font-weight: bold>"
}
function del_row() {
if(sqd.rows.length==1) return;
var checkit = false
for (var i=0;i<document.all.Number.length;i++) {
if (document.all.Number[i].checked) { checkit=true;
sqd.deleteRow(i)
break;
}
} if (checkit) { for(i=1;i<sqd.rows.length;i++){
sqd.rows[i].cells[0].innerText=i
}
} else
{
alert("请选择一个要删除的对象");
return false}}
//******************************update***********************************
function onBlurValue(){
document.all.price.value=1;
alert(document.all.price.value);
}
//***********************************************************************
</script><script language="javascript">
function check()
{ var j=0;
for (i=0;i<document.form1.elements.length;i++){
var strType = document.form1.elements[i].type
if (strType == 'text')
{
if (document.form1.elements[i].value!="")
{
j=j+1;
}
}
}
if (j-1==0)
{
alert("请输入条码!");
document.form1.elements[i].focus();
return false;
}
if ((j-1)%2!=0)
{
alert("请输入条码!");
document.form1.elements[i].focus();
return false;
}
document.form1.submit();
}
</script>
<table width="100%" border=0 align="center" cellpadding=2 cellspacing=1 bgcolor="#FFFFFF">
<form name="form1" action="sale2.asp" method="post">
<tr>
<td height="25" align="center"><strong><font size="5">商品销售单</font></strong></td>
</tr>
<tr>
<td align=center valign=top bgcolor=f7f7f7>
<table id="sqd" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr class="TRL2">
<td height="25" width="6%"><strong><font size="5">序号</font></strong></td>
<td width="7%"><strong><font size="5">选中
<input name="Number" type="hidden" >
</font></strong></td>
<td width="36%"><strong><font size="5">商品条码</font></strong></td>
<td width="51%"><strong><font size="5">销售数量</font></strong></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td align="center">
<input name="addrow" type="button" onClick="add_row(1)" class="button" value="添加新行">
<input name="delrow" onclick="del_row()" type="button" class="button" value="删除行">
<input name="save" type="button" value="确定" onClick="javascript:check();" width="150" height="100" style="font-size: 30px; font-weight: bold">
</td>
</tr>
</table>
</td>
</tr></form>
</table>
<%
i=1
for i=1 to 10%>
<script language="javascript">
add_row();
</script>
<%next%>