我一直在寻找一个非常好的,有据可查的jquery插件,它可以让我通过单击另一个按钮来编辑值。使用Jeditable保存编辑值
Jeditable是我找到的最接近的,但我不知道如何让它保存,即使在测试。快速返回值的东西。
我用这对我的PHP脚本:
function editprofile()
{
$this->input->post('value');
}
这是我的JS脚本:
$("a.edit").live('click', function(){
$(this).parent("li").find("span.detail").editable('profile/editprofile',
{
indicator : 'Saving...',
submit : 'OK',
tooltip : 'Click to edit...'
});
});
这是我的HTML:
<span id="city" class="detail">Philadelphia</span>
<a href="javascript:;" class="edit">Edit</a>
修正: 应该PHP成为:
echo $this->input->post('value');
您可以扩展服务器端代码吗? – voyager 2009-08-18 19:38:05