If I have in main.js's file, global variable a = 5;
and I'm sending this variable with AJAX to PHP, is it possible to change this variable from the console or somehow from the outside and have AJAX send wrong parameter?
Here is an example:
var init = {
id: null,
setId: function(i){
this.id = i;
alert(this.id);
},
callAjax: function(){
alert(this.id);
}
};
If I have this, is it still possible to change?
If it is accessible from console (since you are stating that its a global variable), it is possible to modify it from console, just by writing a=1
or anything.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments