
預覽:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="test.js" ></script>
</head>
黃彥霖 發表在 痞客邦 留言(0) 人氣(2,473)

預覽:
說明:伺服器必須要做可以接收多檔案機制
<!DOCTYPE html>
<html>
<script type="text/javascript" src="test.js" ></script>
黃彥霖 發表在 痞客邦 留言(1) 人氣(4,470)
var my_id = document.getElementById("my_id");
my_id.className = "new_class";
黃彥霖 發表在 痞客邦 留言(0) 人氣(1,599)
選擇圖片並顯示 (單檔案):
<p>
<label>請選擇圖片:</label>
<input type="file" id="file_input" accept="image/jpeg, image/png"/>
</p>
<div id="result"></div>
黃彥霖 發表在 痞客邦 留言(0) 人氣(5,234)
<html>
<body>
<video id="gum-local" autoplay></video>
</body>
</html>
黃彥霖 發表在 痞客邦 留言(0) 人氣(2,331)
var s = s.replace(/\被替換的字串/g,"新字串");
例如:
var s = "AAA,BBB,CCC";
s = s.replace(/\,/g,"<br>");
輸出:
AAA<br>BBB<br>CCC
黃彥霖 發表在 痞客邦 留言(0) 人氣(131)
function getParameter(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
黃彥霖 發表在 痞客邦 留言(0) 人氣(565)
<script>
var jsontext = '{"name":"Loli","age":"12","phone":["091314520","021314520"]}';
黃彥霖 發表在 痞客邦 留言(0) 人氣(2,171)