Javascript 使用CodeIgniter时,动态创建的输入文本变量在发布时不可用
我正在使用CodeIgniter和我的框架,并使用Javascript动态创建一些文本输入字段,这一切都很好,但当我发布表单时,这些新创建的字段不可用??知道为什么吗?我需要在codeIgniter中添加一些东西来获取这些变量 请参阅下面的代码 谢谢Javascript 使用CodeIgniter时,动态创建的输入文本变量在发布时不可用,javascript,php,codeigniter,Javascript,Php,Codeigniter,我正在使用CodeIgniter和我的框架,并使用Javascript动态创建一些文本输入字段,这一切都很好,但当我发布表单时,这些新创建的字段不可用??知道为什么吗?我需要在codeIgniter中添加一些东西来获取这些变量 请参阅下面的代码 谢谢 <head> <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script src="/js/jquery.Jcro
<head>
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script src="/js/jquery.Jcrop.js"></script>
<script type="text/javascript">
$(function() {
var scntDiv = $('#p_scents');
var i = $('#p_scents p').size() + 1;
$('#addScnt').live('click', function() {
$('<p><label for="p_scnts"><input type="text" size="20" name="p_scnt_' + i +'" value="" placeholder="Input Value" /></label> <a href="#" id="remScnt">Remove</a></p>')
i++;
return false;
});
$('#remScnt').live('click', function() {
if( i > 1 ) {
$(this).parents('p').remove();
i--;
}
return false;
});
});
</script>
<script type="text/javascript">
jQuery(function($){
var jcrop_api;
$('#target').Jcrop({
onChange: showCoords,
onSelect: showCoords,
onRelease: clearCoords
},function(){
jcrop_api = this;
});
$('#x2').val(c.x2);
$('#y2').val(c.y2);
$('#w').val(c.w);
$('#h').val(c.h);
};
function clearCoords()
{
$('#coords input').val('');
};
</script>
</head>
<body>
<?php echo form_open('action'); ?>
<table border=1 cellpadding="1" cellspacing="0" width=80%>
<tr><td colspan=2 align=center>
<a href="#" id="addScnt">Add Another Input Box</a>
</td>
</tr>
<tr><td valign=top>Alternate Urls
</td>
<td>
<div id="p_scents">
</div>
<input type=submit>
</td>
</tr>
</table>
<?php echo form_close(); ?>
<?php echo validation_errors(); ?>
</body>
$(函数(){
var scntDiv=$('p#u scents');
变量i=$('#p#p').size()+1;
$('#addScnt').live('click',function()){
$(“”)
i++;
返回false;
});
$('#remScnt').live('click',function()){
如果(i>1){
$(this.parents('p').remove();
我--;
}
返回false;
});
});
jQuery(函数($){
var jcrop_api;
$('#target').Jcrop({
onChange:showCoords,
onSelect:showCoords,
onRelease:clearCoords
},函数(){
jcrop_api=这个;
});
$('x2').val(c.x2);
$('y2').val(c.y2);
$('w').val(c.w);
$('h').val(c.h);
};
函数clearCoords()
{
$('coords input').val('');
};
备用URL
请在我不使用codeigniter时发布你的代码作品,,,,请参阅上面的代码如果这是文字源,请在Jcrop之后的第一行
(
调用你有一些额外的随机文本:“create.html”105L,1769C
。开始