
这样传递表单的数据,在ie下面是可以的:
<script>
function addcomment()
{
new Ajax.Updater( ‘comments', ‘addcomment.php',
{
method: ‘post',
parameters: $('cform').serialize(),
onSuccess: function() {
$('comment_text').value = ”;
}
} );
}
</script>
但是在ff下面就不行了。参数需要改为字符串,如 :
var params='act=post&title='+encodeURIComponent($F('title'))+'&content='+encodeURIComponent($F('content'))+'&id='+<?=$id?>;
评论列表