gtrowa2003
|
分享:
▼
x0
|
[HTML][討論] 網頁設計的問題
幫人問的.......
我的程式碼如下,我有二個form它會顯示成兩行,有沒有辦法讓它變成都顯示在一行裡呀,謝謝請教教我謝謝!
<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <title>停留時間</title> <SCRIPT LANGUAGE="JavaScript"> <!-- var ap_name = navigator.appName; var ap_vinfo = navigator.appVersion; var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));
var time_start = new Date(); var clock_start = time_start.getTime(); var dl_ok=false;
function init () { if(ap_name=="Netscape" && ap_ver>=3.0) dl_ok=true; return true; }
function get_time_spent () { var time_now = new Date(); return((time_now.getTime() - clock_start)/1000); }
function show_secs () // show the time user spent on the side { var i_total_secs = Math.round(get_time_spent()); var i_secs_spent = i_total_secs % 60; var i_mins_spent = Math.round((i_total_secs-30)/60); var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent); var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent); document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent; window.setTimeout('show_secs()',1000); }
var max=0; function textlist() { max=textlist.arguments.length; for (i=0; i<max; i++) this=textlist.arguments; } tl = new textlist( "歡迎光臨!!", "謝明珠議員個人網站,請大家多多指教", "歡迎光臨!!", "謝明珠議員個人網站,請大家多多指教" );
var x = 0; pos = 0; var l = tl[0].length; function textticker() { document.tickform.tickfield.value = tl[x].substring(0, pos) + "_"; if(pos++ == l) { pos = 0; setTimeout("textticker()", 1960); if(++x == max) x = 0; l = tl[x].length; } else setTimeout("textticker()", 20); } // --> </script> </head> <body OnLoad="textticker();init(); window.setTimeout('show_secs()',1);"> <form name="fm0" onSubmit="0"><font face="華康中特圓體" size="4">停留時間:</font><font face="Arial Unicode MS"><input type="text" name="time_spent" size="7" onFocus="this.blur()"></font> </form> <form name="tickform"> <textarea name="tickfield" rows="2" cols="27" style="background-color: rgb(0,0,0); color: rgb(255,255,255); cursor: hand; font-family: Arial; font-size: 12px" wrap="virtual"></textarea></form> <hr> </body>
</html>
|