JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <head>
        <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
    </head>
<body>
<a href = "https://www.google.com/" >

click here

</a>
<iframe></iframe>
</body>

</html>

JavaScript

$('a').on('click', function(event){
        event.preventDefault();
        let url = $(this).attr('href');
        $('iframe').attr('src', url);
    })