php - Javascript location doesn't work -
here code.
echo"<button class='buttonajax' onclick='javascript:location = try.php;'>go back</button>";
i tried redirect page through button not perform function.
please tel me problem in code?
you need wrap location you’re sending user in quotes because otherwise javascript try interpret variable name:
echo"<button class='buttonajax' onclick='javascript:location = \'try.php;\''>go back</button>";
Comments
Post a Comment