You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
452 B
JavaScript
19 lines
452 B
JavaScript
2 years ago
|
protocol = window.location.protocol
|
||
|
host = window.location.host
|
||
|
function get_question() {
|
||
|
$.ajax({
|
||
|
url:protocol+"//"+host+"/api/get_question.php",
|
||
|
data:{},
|
||
|
dataType:"json",
|
||
|
type:"POST",
|
||
|
success:function(data) {
|
||
|
if (data.result == 'success') {
|
||
|
$("#get_question").html('('+data.msg+')');
|
||
|
} else if (data.result == 'error') {
|
||
|
$("#get_question").html('('+data.msg+')');
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
get_question();
|