20 lines
421 B
JavaScript
20 lines
421 B
JavaScript
|
function clickButton() {
|
||
|
var s = document.createElement("script");
|
||
|
s.src = "source/jsonp_impossible.php";
|
||
|
document.body.appendChild(s);
|
||
|
}
|
||
|
|
||
|
function solveSum(obj) {
|
||
|
if ("answer" in obj) {
|
||
|
document.getElementById("answer").innerHTML = obj['answer'];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var solve_button = document.getElementById ("solve");
|
||
|
|
||
|
if (solve_button) {
|
||
|
solve_button.addEventListener("click", function() {
|
||
|
clickButton();
|
||
|
});
|
||
|
}
|