JavaScript 基本類 使用onClick 及 this取得name
關鍵詞(keyword): onClick 、this、name
基本用法:
<script type="text/javascript">
function myMsg(myObj){
alert("name 為: " + myObj.name);
}
</script>
<input type="button" id="myButtonId" name="mybuttonName" value="送出" onclick="myMsg(this)">
結果:
- 首頁
- JAVA 目錄
- JAVA WEB 目錄
- JAVA 其他未分類 目錄
- Grails目錄
- jQuery 目錄
- Apache 目錄
- JavaScript 目錄
- Spring + Hibernate 目錄
- Hibernate 目錄
- Linux 目錄
- 程式開發工具目錄
- MySQL 目錄
- PHP目錄
- C/C++ 目錄
- Google App Engine 目錄
- HTML5/CSS3
- 程式開發基本資訊
- Android
- Oracle 目錄
- Struts 目錄