放音樂,影片,使用embed語法。 先準備好你的影音檔。 然後,在用下列語法貼上即可。 <embed src=檔案位址> 尺寸大小: 調高度 <embed src=檔案位址 width=寬度 height=高度> 不自動播放: <embed src=檔案位址 autostart=false> 循環播放: <embed src=檔案位址 loop=true> 隱藏面版: <embed src=檔案位址 hidden=true>
- Sep 10 Tue 2013 11:57
Embed語法
- Sep 10 Tue 2013 11:56
自動跳出網頁視窗語法
位置一定要放對 一個是</head>前 一個是<body>後 <html>
<head>
<title>標題 </title>
<script type="text/javascript"> function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } </script>
</head>
<body onload="MM_openBrWindow('你要跳出的網址','aa','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=500')">
</body>
</html>
- Sep 10 Tue 2013 11:55
文字方塊輸入你要的文字後自動跳下格文字框
<input type="text" name="A" maxlength="2" onKeyUp="next(this,'B')" size="1"/>
<input type="text" name="B" maxlength="2" onKeyUp="next(this,'C')" size="1"/>
<input type="text" name="C" maxlength="2" onKeyUp="next(this,'D')" size="1"/>
以此類推...
<script>
- Sep 10 Tue 2013 11:54
中文檔案名稱上傳~卻無法上傳檔案!
中文檔案無法上傳,是PHP檔案控制的函式沒辦法控制utf-8的中文
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . iconv('utf-8','big5',$_FILES["file"]["error"]);
} else {
echo "Upload: " .iconv('utf-8','big5', $_FILES["file"]["name"] . " <br />");
echo "Size: " . iconv('utf-8','big5',($_FILES["file"]["size"] / 1024) . " Kb <br />");
echo "上傳完成";
if (file_exists("upload/" .iconv('utf-8','big5', $_FILES["file"]["name"])))
{echo "檔案已經存在,請勿重覆上傳相同檔案";
}else{
move_uploaded_file($_FILES["file"]["tmp_name"],"upload/".iconv('utf-8','big5',$_FILES["file"]["name"]));
}
}
?>
- Sep 10 Tue 2013 11:53
"Column '名稱' specified twice"
再跑SQL時 網頁出現訊息----> "Column '名稱' specified twice"
請檢查是否你存的欄位是否有重覆到,(例如新增兩次同樣名稱)。
- Sep 10 Tue 2013 11:51
文字欄位 - 點入後消失預設初值
<script type="text/javascript">
<!--
function MM_setTextOfTextfield(objId,x,newText) { //v9.0
with (document){ if (getElementById){
var obj = getElementById(objId);} if (obj) obj.value = newText;
}
}
//-->
</script>
<input name="name1" type="text" id="name1" onfocus="MM_setTextOfTextfield('name1','','')" value="初值"/>
- Sep 10 Tue 2013 11:49
判斷欄位內是否有值?叫出視窗提示輸入
<script type="text/javascript">
function chk(){
if(document.send.account.value==''){
alert('帳號未填');
document.send.account.focus();
return false;
}
if(document.send.pass.value==''){
alert('密碼未填');
document.send.pass.focus();
return false;
}
return true;
}
</script>
<form action="" method="post" name="send" onsubmit="return chk();">
帳號<input type="text" name="account" size="5" />
密碼<input type="password" name="pass" size="5" />
<input type="submit" value="送出" />
- Sep 10 Tue 2013 11:48
禁止輸入符號,英文,中文只能輸入數字
onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
將這段插入到 裡,
當輸入符號,英文,中文時會自動刪除。
- Sep 10 Tue 2013 11:45
PHP 跑馬燈語法
<marquee>文字或圖</marquee>
方向:direction="參數值";
參數值 up,dun,,left,right
對齊:align="參數值";
參數值 top,midden,botton
速度:scrollamount="參數值" ;
參數值1.2.3.4.5.....
行為設定:behavior="參數值";
參數值 alternate(來回),slide(跑入後停止)
背景顏色:bgcolor="參數值";
參數值 顏色的色碼
滑鼠滑入停止,滑出繼續跑。 <marquee onMouseOver="this.stop()" onMouseOut="this.start()" >
- Sep 10 Tue 2013 11:43
利用Dreamweaver製作網頁時出現Incorrect table name的錯誤
找出$updateSQL = sprintf("UPDATE ``number`` SET
修改成
$updateSQL = sprintf("UPDATE number SET
將兩個``去掉
完成