Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
  
  <script>
    $(document).ready(function(){
      
      $("#process").click(function() {   
        var totalScore = 0;
        /*
         Your code to calculate Total Score
         Remove the next line in real code.
        */
        totalScore = 55; //Remove this
    
    alert("Total Score = "+totalScore);
      $("#submit-link").attr('href',"http://example.com/yourscore.html?totalScore="+totalScore);  
});
    
    
    });
  </script>
<meta charset=utf-8 />
<title>JS Bin</title>
  
</head>
<body>
  <button id="process">Process</button>
<br />
<a href="#" id="submit-link">Submit Total Score</a>
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers