t>",//这句会报错的 "sDom": "r>t>",clientScript->registerCssFile(Yii::app()->re">
时间:2021-07-01 10:21:17 帮助过:5人阅读
//已解决
"sDom": "<\'row\'<\'span8\'l><\'span8\'f>r>t<\'row\'<\'span8\'i><\'span8\'p>>",
//这句会报错的
"sDom": "<'row'<'span8'l><'span8'f>r>t<'row'<'span8'i><'span8'p>>",
clientScript->registerCssFile(Yii::app()->request->baseUrl.'/assets/DataTables-1.9.4/css/datatable.css');
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/assets/DataTables-1.9.4/js/jquery.dataTables.min.js',CClientScript::POS_END);
Yii::app()->clientScript->registerScript('example','
$(document).ready(function() {
$("#example").dataTable({
"aaSorting": [[ 0, "desc" ]],
"sPaginationType": "full_numbers",
"sDom": "<'row'<'span8'l><'span8'f>r>t<'row'<'span8'i><'span8'p>>",
"oLanguage": {
"sUrl": "assets/DataTables-1.9.4/language/zh_CN.json"
}
});
});
',CClientScript::POS_END);
?>
操作选项
'list-group-item')); ?>
'list-group-item')); ?>
php 字符串里面同时有 "" 和 ' ,本身又是字符串怎么办?
//已解决
"sDom": "<\'row\'<\'span8\'l><\'span8\'f>r>t<\'row\'<\'span8\'i><\'span8\'p>>",
//这句会报错的
"sDom": "<'row'<'span8'l><'span8'f>r>t<'row'<'span8'i><'span8'p>>",
clientScript->registerCssFile(Yii::app()->request->baseUrl.'/assets/DataTables-1.9.4/css/datatable.css');
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/assets/DataTables-1.9.4/js/jquery.dataTables.min.js',CClientScript::POS_END);
Yii::app()->clientScript->registerScript('example','
$(document).ready(function() {
$("#example").dataTable({
"aaSorting": [[ 0, "desc" ]],
"sPaginationType": "full_numbers",
"sDom": "<'row'<'span8'l><'span8'f>r>t<'row'<'span8'i><'span8'p>>",
"oLanguage": {
"sUrl": "assets/DataTables-1.9.4/language/zh_CN.json"
}
});
});
',CClientScript::POS_END);
?>
操作选项
'list-group-item')); ?>
'list-group-item')); ?>
加转义符“\”
$bar = <<
EOT;