How can I get the url value after a question mark in javascript?
I want the following behaviour:
if value is yes then 10+2
else if value is no then 10.
I want to output with alert messages.
<div class="col-xs-4 col-sm-4 col-md-4 text-center width100">
<a href="piccal.html" class="btn btn-success" id="yes">PIC Grant Calculator</a>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 text-center width100">
<a href="piccal.html" class="btn btn-danger" id="no">PIC Grant Calculator</a>
</div>
<script>
if (value == no) {
alert('hello');
}
</script>
<script>
if (value == yes) {
alert('hi');
}
</script>