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

  • Home
  • SEARCH
  • 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 6944215

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:15:26+00:00 2026-05-27T13:15:26+00:00

I try to implement the following code: <a href = http://www.google.com/ id=external>go to google</a>

  • 0

I try to implement the following code:

  <a href = "http://www.google.com"/ id="external">go to google</a>
   <span  id="num1"></span>// to show the number of clicks so far.
  <a href = "index.php" id="internal">go to home</a>
  <span id="num2"></span>>// to show the number of clicks so far.


<script>
  $(document).ready(function() {
    var count1=0;
    var count2=0;
    $("#external").click(function(){
        count1++;

   });
 $("#num1").html(count1);
    $("#internal").click(function(){
        count2++
   });
  $("#num2").html(count2);

  });

</script>

I am not sure what I did above is right for the purpose of keeping track of the number of clicks on each link, and the problem is that when the page is loaded again, the count variable will be reset to 0, I wonder if I need to insert the count variable into database or is there even more efficient way to do this, any one could help me with that, any help will be greatly appreciated!

  • 0 0 Answers
  • 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

Sidebar

Related Questions

I try to implement the following code: <a href = http://www.google.com/ id=external>go to google</a>
I try to implement the following code: <!DOCTYPE html> <html lang=en> <head> <meta http-equiv=Content-Type
I try to implement the following code: html <span id = myset>school</span> Javascript var
Given the following code, I try to implement the public static Point operator +(int
I try to implement the following code, this page will display when survey is
I try to implement the following code: <input type=radio name=yesno2 value=yes style=outline:0;/>Yes <input type=radio
I try to implement the following code <div class=functionitem id=selector_cat> <select name=sets style=overflow:auto;width:100px;> <option
I try to implement the following code: <div class=clearid=usernameline>username:<input type=text name=username id=username style=border:1px solid
Try the following code public enum Color { Blue=1, Red=2, Green=3 } public List<Color>
I am using the following code to show dynamic progress dialog : public void

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.