Is it possible to assign a php variable to javascript ? And
also is it possible to fetch the page contents if the url
is not under our control ?
Answer / gagan rana
Yes ,it is possible by doing like the following:
<?php
$x = 'hai!';
echo "<script>var x = '" . $x . "';</script>";
?>
Is This Answer Correct ? | 3 Yes | 0 No |
How do you check if a string is a number javascript?
What is closure? Give an example.
Is it possible make a call to server side event of any button using javascript?
Is javascript enabled on my computer?
Difference between Client side JavaScript and Server side JavaScript?
What is the ‘Strict’ mode in JavaScript and how can it be enabled?
What are javascript functions?
What is a prompt box in javascript?
what is a code in vb amount display in words
Explain hoisting in javascript?
Which keyword is used to print the text in the screen?
Explain unescape() in javascript?