0

im wondering if there is a function or something like php's <?php echo $_GET['height'];?> but in HTML or javascript. I need it to get variables of the URL

Xcite
  • 9
  • 6

2 Answers2

0

Use location.search. It returns the entire query string, which you then can split, if you need to.

GolezTrol
  • 114,394
  • 18
  • 182
  • 210
0

Html is a markup language, so you can't do such things. Try using javascript. here's an example:

//returns the height of the client
function height(){
   var clientHeight = document.body.clientHeight;
   alert(clientHeight);

}

Gabriel Dzul
  • 158
  • 1
  • 5