- JavaScript
-
2012-04-11
この記事は最終更新日から1年以上経過しています。
1 | var button = document.createElement( "input" ); |
2 | button.type = "button" ; |
3 | button.value = "button" ; |
4 | button.className = "button" ; |
5 |
6 | // onclickイベントを追加 |
7 | button.setAttribute( "onclick" , "func();" ); |
8 |
9 | document.body.appendChild(button); |
この記事がお役に立ちましたらシェアお願いします

1,774 views