在IE下出错 哪里问题? 本帖最后由 xyflash2 于 2011-04-12 20:53:55 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 实现的功能是点按键,添加两个框????是的话,那你少写了个结束</table>;;<table cellpadding="0" cellspacing="0"><tr> <td height="50" valign="top" class="left"><input type="button" name="but1" id="but1" value="加" onclick="file();" /></td> <td><table cellpadding="0" cellspacing="0"> <tbody id="o"> <tr> <td valign="top"class="right"><input type="text" name="_" /> <input type="text" name="_" /></td> </tr> </tbody> <tbody id="n"></tbody></table></table> ie6可以。ie7\8\9没测试这样试试呢?<table cellpadding="0" cellspacing="0" id="o"><tbody>-------------你把嵌套表格的DOM写完整吧。除了1楼说的,<tbody id="n"></tbody>最好放到新的表格里 原来是页面中加有!DOCTYPE的原因?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">页面开头加这个就出错 不加就好了 该怎么办? 请问此功能用jquery如何实现 XHTML 1.0 标准比较严格,你的代码中少了几个标签,可能就出错了吧!<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> <script type="text/javascript"> $(function(){ $("#but1").click(function(){ var newn=$("#o>tr:first").clone(true); var tags=newn.find(":input"); tags.each(function(i){ if($(this).attr("type")){ $(this).attr("id",'_' +i); $(this).attr("name",'_' +i) } }) $("#n").append(newn); }) }) </script> </HEAD> <BODY> <table cellpadding="0" cellspacing="0"> <tr> <td height="50" valign="top" class="left"> <input type="button" name="but1" id="but1" value="加" /> </td> <td> </tr> </table> <table cellpadding="0" cellspacing="0"> <tbody id="o"> <tr> <td valign="top"class="right"> <input type="text" name="_" /> <input type="text" name="_" /> </td> </tr> </tbody> <tbody id="n"> </tbody> </table> </BODY></HTML> 那删除该怎么实现? 也用 jquery .... 要学会自己写代码,不要去copy别人的!问思路就行! <input type="button" name="but2" id="but2" value="删除" /> <script type="text/javascript"> $(function(){ $("#but1").click(function(){ var newn=$("#o>tr:first").clone(true); var tags=newn.find(":input"); tags.each(function(i){ if($(this).attr("type")){ $(this).attr("id",'_' +i); $(this).attr("name",'_' +i) } }) $("#n").append(newn); }) $("#but2").click(function(){ $("#n>tr:last").remove(); }) }) </script> JavaScript问题。急求!! 这两段代码有什么不同?为什么执行的结果会不一样? javascript打开一个窗体 js屏蔽右键菜单问题 移动行时,不管怎么上下移动,js如何取行变换后的第一行和最后一行. js的前台验证求助 获取TD元素。。 实现启动窗口的全屏打开方式 谁在用阿信的省市省联动菜单??如何初始化菜单值 ?? 一个关于表单验证的问题!~~菜鸟,急~~! 有什么方法让下拉列表的内容宽度自适应呢 适合中国人的变量、函数命名法
<table cellpadding="0" cellspacing="0">
<tr>
<td height="50" valign="top" class="left"><input type="button" name="but1" id="but1" value="加" onclick="file();" /></td>
<td><table cellpadding="0" cellspacing="0">
<tbody id="o">
<tr>
<td valign="top"class="right"><input type="text" name="_" /> <input type="text" name="_" /></td>
</tr>
</tbody>
<tbody id="n"></tbody>
</table>
</table>
<table cellpadding="0" cellspacing="0" id="o">
<tbody>
-------------
你把嵌套表格的DOM写完整吧。除了1楼说的,<tbody id="n"></tbody>最好放到新的表格里
页面开头加这个就出错 不加就好了 该怎么办?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type="text/javascript">
$(function(){
$("#but1").click(function(){
var newn=$("#o>tr:first").clone(true);
var tags=newn.find(":input");
tags.each(function(i){
if($(this).attr("type")){
$(this).attr("id",'_' +i);
$(this).attr("name",'_' +i)
}
})
$("#n").append(newn);
})
})
</script>
</HEAD> <BODY>
<table cellpadding="0" cellspacing="0">
<tr>
<td height="50" valign="top" class="left">
<input type="button" name="but1" id="but1" value="加" />
</td>
<td>
</tr>
</table>
<table cellpadding="0" cellspacing="0">
<tbody id="o">
<tr>
<td valign="top"class="right">
<input type="text" name="_" /> <input type="text" name="_" />
</td>
</tr>
</tbody>
<tbody id="n">
</tbody>
</table>
</BODY>
</HTML>
<input type="button" name="but2" id="but2" value="删除" /> <script type="text/javascript">
$(function(){
$("#but1").click(function(){
var newn=$("#o>tr:first").clone(true);
var tags=newn.find(":input");
tags.each(function(i){
if($(this).attr("type")){
$(this).attr("id",'_' +i);
$(this).attr("name",'_' +i)
}
})
$("#n").append(newn);
}) $("#but2").click(function(){
$("#n>tr:last").remove();
})
})
</script>