teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

追記

2017/06/03 12:11

投稿

s8_chu
s8_chu

スコア14731

answer CHANGED
@@ -1,4 +1,4 @@
1
- HTML4では`wrap属性`と`placeholder属性`は**定義されていません**。HTML5を使いましょう。
1
+ 動作しない原因は、idをつけていないことです。また、HTML4では`wrap属性`と`placeholder属性`は**定義されていません**。HTML5を使いましょう。
2
2
  ```HTML
3
3
  <!DOCTYPE html>
4
4
  <html lang="ja">
@@ -9,7 +9,8 @@
9
9
  <body>
10
10
  <textarea rows="3" cols="30" wrap="hard"
11
11
  style="width:300px;height:100px;border-style:none;font-size:x-large;text-align: center;"
12
- placeholder="Input your message!" id="TEXT">
12
+ placeholder="Input your message!"
13
+ onchange="Limit(event)" onkeyup="Limit(event)" id="TEXT">
13
14
  </textarea>
14
15
  <script>
15
16
  function lineCheck(e) {

1

修正。なぜか勝手に投稿された。

2017/06/03 12:11

投稿

s8_chu
s8_chu

スコア14731

answer CHANGED
@@ -30,4 +30,5 @@
30
30
  window.document.onkeypress = lineCheck;
31
31
  </script>
32
32
  </body>
33
- </html>
33
+ </html>
34
+ ```