Yii中的Ajax-类型:发布

I have one question:

  <script type="text/javascript">
    var num = 6;
    $("#ajaxBtn").click(function() {
    $.ajax({
        url:    "<? echo Yii::app()->createUrl('section/show'); ?>",
        type:   "POST",
        data:   {"num":num},
    ...
});

must this construction send $_POST['num'] to my controller's action or not?

thanks in advance for any suggestions

Yes, $_POST['num'] (or, more appropriately, Yii::app()->getRequest()->getParam('name')) will be available to your controller action.

I 'm not so sure what you mean by using "must" though.