“Öffnen Sie den Link im neuen Fenster, nicht in der Registerkarte” Code-Antworten

So werden Links in einem neuen Fenster geöffnet

The short answer is: just add a target="_blank" attribute to your links (anchor tags).

<a href="https://www.thesitewizard.com/" target="_blank">thesitewizard.com</a>
FunToCode

Öffnen Sie den Link im neuen Fenster, nicht in der Registerkarte

<a href="https://www.codegrepper.com/" target="_blank">Grep!</a> 
VasteMonde

Öffnen Sie den Link im neuen Fenster, nicht in der Registerkarte

<!DOCTYPE html>
<html>
	<body>
		<button onclick="myFunction()">Try it</button>

		<script>
			function myFunction() {
				// JS function to open a new window(not "New Tab"), e.g: here, we are
				// opening the new window in youtube.com 
  				var myWindow = window.open("https://www.youtube.com", "", width = "100vw", height = "100vh");
			}
		</script>

	</body>
</html>
Samiul Abid Chowdhury

Öffnen Sie den Link im neuen Fenster, nicht in der Registerkarte

<!DOCTYPE html>
<html>
	<body>

		<p>Click the button to open a new window called "MsgWindow" with some text.</p>

		<button onclick="myFunction()">Try it</button>

		<script>
			function myFunction() {
				// JS function to open a new window(not "New Tab"), e.g: here, we are
				// opening the new window in youtube.com 
  				var myWindow = window.open("https://www.youtube.com", "", width = "100vw", height = "100vh");
			}
		</script>

	</body>
</html>
Samiul Abid Chowdhury

Ähnliche Antworten wie “Öffnen Sie den Link im neuen Fenster, nicht in der Registerkarte”

Fragen ähnlich wie “Öffnen Sie den Link im neuen Fenster, nicht in der Registerkarte”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen