I can click "Open 1" button to open a full link in a new tab in Chrome.
When I click "Open 2" button, I can't open a the link without http or https, the browser URL address displays http://localhost:53484/www.google.com.
How can I fix it?
Code A
<html>
<head>
<script src="Js/jquery-3.6.3.min.js"></script>
<script type="text/javascript">
function open1() {
window.open('http://www.google.com')
}
function open2() {
window.open('www.google.com')
}
</script>
</head>
<body>
<input type=button value="Open 1" onclick="open1()">
<input type=button value="Open 2" onclick="open2()">
</body>
</html>