在gridview中按钮传递data值到js中的方法(选择按钮)

array(
			'class'=>'ButtonColumn',
			'template'=>'{select}',
                        'buttons'=>array(
                            'select'=>array(
                                'label'=>'选择',
                                //这里。。。
                                'url'=>'"javascript:selected(".$data->cid.",".$data->full_name.");"',
                               // 'click'=>'function(){selected(".$data->cid.")}',
                            ),
                        ),
		),
	),
)); ?>
<script type="text/javascript">
    function selected(id,name){
        $('#search_client').css('display','none');
        $('#disname').val(name);
        $('#ClientLink_cid').val(id);
    }
</script>


你可能感兴趣的:(在gridview中按钮传递data值到js中的方法(选择按钮))