2012-09-28 221 views
0

我對HTML知之甚少。我一直在尋找和解答這個問題幾個小時。我正在嘗試製作一個居中且鏈接到網站的HTML按鈕。有人可以給我這個代碼嗎?謝謝。居中html按鈕鏈接

回答

0

製作一個居中且鏈接到網站的HTML按鈕的最簡單方法。

<center> 
     <input type="button" value="Put Your Text Here" onClick="parent.location='http://www.google.com/'"> 
</center> 
0
<head> 
    <script type="text/javascript"> 
     function DoIt(){ 
     window.open ('http:somewhere.net','_self',false); 
     } 
    </script> 
</head> 

<body> 
    <center> 
    <button onclick="DoIt()">Put Some Text Here</button> 
    </center> 
</body> 
0

<div align='center'>buttoncode</div>

0

之間的按鈕的代碼將代碼中

之間
<center> 

</center> 

爲我工作!