摘要: 来源:http://blog.csdn.net/woshixuye/article/details/7422985 阅读全文
posted @ 2017-03-31 14:09 侠岚之弋痕夕 阅读(104) 评论(0) 推荐(0) 编辑
摘要: e.preventDefault()阻止事件默认行为 例如: $("a").click(function (e) { alert("默认行为被禁止喽"); e.preventDefault(); }); <a href="http://www.baidu.com">测试</a> 阅读全文
posted @ 2017-03-31 14:06 侠岚之弋痕夕 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Html助手 1 .在@app\views\test的index.php中: 'form','class'=>'form','data'=>'myself']);?> 'form-control','placeholder'=>'hehe']);?> 'form-control']);?> 'form-control']);?> ... 阅读全文
posted @ 2017-03-31 11:52 侠岚之弋痕夕 阅读(518) 评论(0) 推荐(0) 编辑
摘要: public function actionAjax() { if(isset(Yii::$app->request->post('test'))){ $test = "Ajax Worked!"; // do your query stuff here }else{ $test = "Ajax failed"; /... 阅读全文
posted @ 2017-03-31 11:02 侠岚之弋痕夕 阅读(2779) 评论(0) 推荐(0) 编辑
摘要: 1.代码片段一: 2.代码片段二: 阅读全文
posted @ 2017-03-31 11:00 侠岚之弋痕夕 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 通过传统的form表单提交的方式上传文件: <form id= "uploadForm" action= "http://localhost:8080/cfJAX_RS/rest/file/upload" method= "post" enctype ="multipart/form-data"> 阅读全文
posted @ 2017-03-31 10:51 侠岚之弋痕夕 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 先在配置文件components数组中加上: 'cache'=>array( 'class'=>'CFileCache'), 设置Cache: Yii::app()->cache->set('testcache', array(1,3,4,6));//默认有效期为一年 Yii::app()->cache->set('testcache', array(1,3,4,6), 3600... 阅读全文
posted @ 2017-03-31 10:26 侠岚之弋痕夕 阅读(1333) 评论(0) 推荐(0) 编辑
Where is the starting point, we don't have a choice, but the destination where we can pursue!