求指导关于动态添加的元素绑定Jquery datepicker、autocomplete等事件的方法 jquerydatepickerautocomplete 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你应该在添加到页面之后利用处理事件,可以考虑类似如下的效果<!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><link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $('.date').datepicker(); $('#btn').click(function(){ $('.box').append('<input type="text" class="date" />'); $('.box .date').each(function(index, element) { $(this).datepicker();//如果是autocomplete,你可以自定义属性来传值 });; }); }); </script></head><body><p> <input type="button" id="btn" value="动态添加"/></p><div class="box"> <input type="text" class="date" /></div></body></html> 没有弄清楚load对象是怎么添加到a对象里面去的 如何隐藏js源代码吗? 初学dhtmlxtree,rss阅读器问题,请求指导 如果在javascript删除一个对象 哪位大侠能把这段js调的在firefox下运行? 求http://www.amazon.com.cn/ 所有19类商品 展开图层的代码 js控制IE分页打印表格数据的问题 极头痛的问题,请大家解惑! 200分求菜单被遮住问题!! 如何检查客户端有没有安装我的组件? 一个树菜单,好几个根节点,如何新增一个根节点 js中function函数数组传值问题,如何将前两个function中的数组同时传入第三个function中
<!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>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script>
$(document).ready(function() {
$('.date').datepicker();
$('#btn').click(function(){
$('.box').append('<input type="text" class="date" />');
$('.box .date').each(function(index, element) {
$(this).datepicker();//如果是autocomplete,你可以自定义属性来传值
});;
});
});
</script>
</head>
<body>
<p>
<input type="button" id="btn" value="动态添加"/>
</p>
<div class="box">
<input type="text" class="date" />
</div></body>
</html>