gaptrast
Member
- Messages
- 123
- Reaction score
- 0
- Points
- 16
Hello,
How to get the query string in javascript?
Like this:
If this website was www.example.com/index.php?p=fun then 'This is fun' had showed up..
How can I get this work?
How to get the query string in javascript?
Like this:
Code:
<script type="text/javascript">
function getp(){
var p = ????GET P????
document.write('this is ' + p);
}
</script>
<div onclick="getp()">Click to show p</div>
If this website was www.example.com/index.php?p=fun then 'This is fun' had showed up..
How can I get this work?