林有幾個問題(我已經在代碼中突出顯示它們):中心的.css鍵,顯示JavaScript內容儲物櫃和顯示Java警報的onClick
問題1:我不知道如何讓# dl_buttn居中 - (最接近45%) - 有什麼辦法可以'對齊:中心'? 問題2:我試圖顯示一個內容櫃onClick - 但是我的儲物櫃沒有彈出? - 顯示JavaScript內容儲物櫃的代碼是否錯誤? 問題/問題3:我不想在第二次點擊時顯示消息,而是想顯示一個java警報 - 我試圖做到這一點,但失敗了 - 誰能幫我解決嗎? - (它的ID是 '信息')
<html>
<head>
<title>Passupload Passowords - Get the Passwords for your .RAR Files Here!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
#dl_buttn {
position:absolute;
left: 45%;
top: 280px;
}
-->
</style>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js">
</script>
</head>
<center>
<body bgcolor="#3c3c3c" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<input type="image" id="dl_buttn" src="images/GETRARPASS.png" alt="Submit Form" position:absolute; onClick="imageClick()" />
<span id="message" style="display:none">You have completed this part!</span>
<script type="text/javascript"> // --------------PROBLEM 3
/* <![CDATA[ */
var count = 0;
function showMessage() {
if (count++ > 0) {
document.getElementById("message").style.display="block";
}
}
function changeImage() {
document.getElementById("dl_buttn").src = "images/REVEALPASS.png"
}
function imageClick() {
var fileref = document.createElement('script');
fileref.setAttribute('type','text/javascript');
fileref.setAttribute('src', 'http://tvserieslink.com/CLP/locker.js?guid=44f3fa3f991e9a34');
showMessage();
setTimeout(changeImage, 3000);
}
/* ]]> */
</script>
<!-- Save for Web Slices (Puloaaa.psd) -->
<table id="Table_01" width="1100" height="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/Pulo_01.gif" width="1100" height="150" alt=""></td>
</tr>
<tr>
<td><img src="images/Pulo_02.gif" width="1100" height="650" alt="">
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</center>
</html>
對不起,我一個小白&對不起張貼整個代碼 - 感謝
您好,感謝您的答覆 - 我已經得到了JavaScript警告現在的工作!我不太明白在何處放置'margin:0 auto'代碼或者'document.body.insertBefore'代碼,你能否指出我想要去哪裏? - 謝謝你的幫助,非常感謝, – Harry 2012-02-24 19:34:28
看看這個[fiddle](http://jsfiddle.net/8Qt7S/)的方向。不知道你的locker.js在做什麼,但你可以修改插入語句,將它放在頁面上的任何位置。 – 2012-02-24 20:02:35
你是一個巨大的幫助!現在大部分工作 - 我真的很感謝你的幫助,現在只有一個問題,那就是內容locker.js只出現在按鈕被第二次按下後(我希望它出現在第一次點擊按鈕) - 對不起,我是這樣一個noob大聲笑,再次感謝! – Harry 2012-02-24 20:34:05