自定義函數參數傳遞為 字符串格式 ,傳遞方式
1:用this傳遞
2:引號缺省
3:轉義字符(html中 " 代表"雙引號,'代表單引號,javascript中直接\" 和Java通用轉義字符集)
<html>
<head>
<script language="LiveScript">
function print(arg){
alert("你好!"+arg);
}
</script>
</head>
<body>
<form>
<input type="button" name="Button1" value="first" onclick="print(this.str)" str="你好one">
<br><br>
<input type="button" name="button2" value="second" onclick=print("你好two")>
<br><br>
<input type="button" name="button3" value="Third" onclick="print ("你好three")">
</form>
</body>
</html>