Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1005791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:21:13+00:00 2026-05-16T08:21:13+00:00

Can anyone explain this code snippet to me? <script type=text/javascript> function querySt(ji) { hu

  • 0

Can anyone explain this code snippet to me?

<script type="text/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 koko = querySt("koko");

  document.write(koko);
  document.write("<br>");
  document.write(hu);

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:21:14+00:00Added an answer on May 16, 2026 at 8:21 am

    This is a function to extract variables from the document’s query string, e.g. if the document’s location is

    example.com/test.htm?koko=123
    

    querySt("koko") will return 123.

    As a side note, the function should use local variables to prevent polluting the global name space:

    var hu = window.location.search.substring(1);
    var gy = hu.split("&");
    ...
    for (var i = 0; i < gy.length; i++) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Check out the following snippet of HTML/Javascript code: <html> <head> <script type=text/javascript> var alerts
Can anyone explain this code to me var ParentClass = function(){ } var ChildClass
Can anyone explain this code to me? Whats the meaning and how to use
Can anyone explain why this code: {% form_theme form _self %} {% block avo_gallery_upload_widget
Can anyone explain why this code with the given routes returns the first route?
anyone can explain me, why this parts of code are acting differently? while((c =
Can anyone explain this (code in global scope) var a = a || 4
Can anyone explain me this code split("[ ]+", $s); thanks $s = "Split this
can anyone please explain this code? #include <avr/io.h> #include <avr/interrupt.h> #include <avr/signal.h> char n
This code crashes at the cout line. Can anyone explain why this doesn't work?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.