variables - How can I display an alert that shows the value of a var in javascript -
i have javascript file displays popup alert
has value value of var
must use:
var errorsite = "web4all"; function displayerror{ alert("there has been error on " && var errorsite && "!") }
i want have alert says:
there has been error on web4all!
just use +
concatenate:
alert("there has been error on " + errorsite + "!")
note not use var
keyword here, declare new "errorsite" variable (and not use existing 1 declared)!
Comments
Post a Comment