顯示具有 javascript 標籤的文章。 顯示所有文章
顯示具有 javascript 標籤的文章。 顯示所有文章

2009年9月22日 星期二

call javascript function from html

test.html
<script src="test.js"></script>
<script language="JavaScript">
test();
</script>

test.js
function test() {
alert("test");
}

regular expression

+: {1, }
*: {0, }
?: { 0, 1}
^: beginning of input
$: end of input
\w: any alphanumerical character including _
\W: any non-word character
\d: any digit
\D: any non-digit
\s: any whitespace
\S: anything but whitespace