Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DefaultController extends Controller {
- public function actionIndex() {
- return $this->render('index');
- }
- public function actionHello() {
- echo 'Hello';
- }
- }
- <script>
- $.ajax({
- type: "get",
- url: "hello",
- success: function (msg) {
- //do something
- },
- error: function (errormessage) {
- //do something else
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement