Skip to main content

How to get query string parameters in Javascript

How to get query string parameters in JavaScript?

function querySt(ji)
{
 hu = window.location.search.substring(1);
 gy = hu.split("&");
 for (i=0;i<gy.length;i++)
 {
  ft = gy[i].split("=");
  if (ft[0] == ji)
  {
   return ft[1];
  }
 }
}


var varParam = querySt("type") ;

varParam will return admin

http://wwww.domainame.com?type=admin

Comments

Popular posts from this blog

How to write a google review?

How to write a google review? Reviews and ratings are very much popular these days. Online visitors give high priority to online reviews, it could be buying a product or a service. Suppose you bought a product or a service and want to give a review or feedback and don't know how? Below post will take you through how to give a Google review to a company. Access www.google.com and type Company Name on the search bar Scroll below and find out Reviews on the right side. Click on Review and login with Gmail account Write a review and give us rating. Post it.  [NOTE: If company not listed under Google Business This will not appear]

How to create simple responsive org chart with CSS

How to create simple responsive org chart with CSS Here is the simple HTML code: <div class="content">   <h1>Responsive Organization Chart</h1>   <figure class="org-chart cf">     <ul class="administration">       <li>         <ul class="director">           <li>             <a href="#"><span>Director</span></a>             <ul class="subdirector">               <li><a href="#"><span>Assistante Director</span></a></li>             </ul>             <ul class="departments cf">               <li><a href="#"><span>Administration</spa...