Alttaki kodu sitemde kullanacağım. 2 sorum var. Ustalardan yardım rica ediyorum.
1. Butonu yazı ile değiştirebilir miyim?
2. Açılacak pencereyi ekranın tam ortasına nasıl getirebilirim?
Kod:
<html>
<script>
function openWindow() {
var newtab = window.open("", "anotherWindow", "width=300,height=150");
newtab.document.write("<p> This is 'anotherWindow'. It is 300px wide and 150px tall new window! </p>");
}
</script>
<body>
<button onclick="openWindow()"> Open Window </button>
</body>
</html>