I have the following html code.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
function myTermsandConditions(){
var myWindow = window.open("","MsgWindow","width=200,height=200");
myWindow.document.write("<p>This is Terms and Conditions Window. Please go through all the Terms and Conditions for your references.</p>")
}
</script>
</head>
<body>
<label class="sign_agree">
<span id="signup-termservice" class="unchecked">
</span>I agree to the
<a href="" >Terms and Conditions</a>
.
</label>
<button onclick="myTermsandConditions()">T&C</button>
</body>
</html>
Here I have a button for T&C and when I click on the button, a window will open and will show the custom message which is given using the function myTermsandConditions(). But I am trying to implement the same for Terms and Conditions link. And as per my requirement, I should not use the button but the window or the pop up should open when clicked on Terms and Conditions link which is given below by using the function myTermsandConditions().
<a href="" >Terms and Conditions</a>
I am trying to find the solution and learn in the process.