<!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=gb2312" />
<title>无标题文档</title>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("body").append($("#sel_Source").clone(true));
});
});
</script>
</head>
<body>
<select id="sel_Source">
<OPTION value="Customer"></OPTION><OPTION value=Hi-P>Hi-P</OPTION><OPTION value=Customer>Customer</OPTION></select>
<button>复制一个</button>
</body>
</html>
如何在选择好下拉框中的内容之后,clone把下列之后的内容也一起复制进去?
解决方案 »
- 请教如何做淘宝这种可搜索的下拉列表框??
- 如何判断ip地址前三位相同,我的是asp+mssql的
- document.cookie 能跨页吗?
- getElementById失效,变成byName了.疑惑中,高手进---
- 这问题估计无数人提过,我不知道想问一次
- 琢磨半天没有结果,召唤CheckBoxList大师进
- 在jscript里面代入参数
- 使用滚动条 滚动面页时会触发什么事件?????????????????
- javascript如何遍历树?
- 请教。三个新窗口的问题。。谢!
- 关于jquery小问题,求解!
- window.top.document.getElementById("cen").cols IE可以,谷歌浏览器不行
$(document).ready(function(){
$("button").click(function(){ $("#sel_Source").clone(true).appendTo($("body")).val($("#sel_Source").val());
});
});
</script>
<select id="sel_Source">
<OPTION value="Customer"></OPTION><OPTION value=Hi-P>Hi-P</OPTION><OPTION value=Customer>Customer</OPTION></select>
<button>复制一个</button>