html - how to get textbox value in hyperlink as id? -


hi want fetch value text box , append hyperlink id. here code unable value of textbox.

<li><a class="ajax-link" href="ajax/legal_notice.php?id=+ document.getelementbyid('cust_id').value">hypelink name</a></li>  <div class="col-sm-6">         customer id       </div>      <div class="col-sm-6">     <input type="text" name="cust_id" id="cust_id" class="form-control" >     </div> 

kindly guide me how value text box.

try this

<html> <head> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>     <script type="text/javascript">         alert("hello");           function resetlink(ele)         {             var href="ajax/legal_notice.php?id="+$(ele).val();             $(".ajax-link").attr("href",""+href);         }       </script> </head>      <body>  <li><a class="ajax-link" href="ajax/legal_notice.php?id=+ document.getelementbyid('cust_id').value">hypelink name</a></li>  <div class="col-sm-6">     customer id   </div>  <div class="col-sm-6"> <input type="text" name="cust_id" id="cust_id" onchange="resetlink(this);" class="form-control" > </div>  </body> 


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -