javascript - Alert a variable in function -
i create function contain parameter , , alert response in function , that's why create global variable "imageserver" , want alert imageserver in "alertfunction" function.
var imageserver ; function win(r) { console.log("response = " + r.response); imageserver = r.response; } function alertfunction() { alert(imageserver); }
i want alert r.response in "alertfunction" function, nil displaying
you must phone call alert function win function.
function win(r) { console.log("response = " + r.response); imageserver = r.response; alertfunction() }
javascript
No comments:
Post a Comment