wp_ajax function return the html page

My error was in my JS file.

I had to write wgs_ajax_object.ajax_url instead of wgs_ajax_object.ajaxurl

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)