Below is script when select option onchange input box will echo the value for select option :
<select id="theSelect">
<option value="888">Foo</option>
<option value="999">Bar</option>
</select>
<br />
<input id="someInput"/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script>
$("#theSelect").change(function() {
$("#someInput").val($(this).val());
}).change(); // trigger once if needed
</script>
My question is how to echo value inside the Anchor Tag(refer id value) :
example : <a href="index.php?id=999" id="link">Click here</a>
thanks.
You can use
prop()method to sethrefvalue for the link: