質問編集履歴

4

文言の修正

2017/08/23 04:41

投稿

strokes_1954
strokes_1954

スコア30

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- ```ここに言語を入力
9
+ ```xhtml
10
10
 
11
11
  <h:inputHidden>
12
12
 
@@ -40,7 +40,9 @@
40
40
 
41
41
 
42
42
 
43
- ```ここに言語を入力
43
+ ```javascript
44
+
45
+ function writeKoumoku() {
44
46
 
45
47
  //試したもの1
46
48
 
@@ -49,6 +51,18 @@
49
51
  //試したもの2
50
52
 
51
53
  $('#1').prop('checked',true);
54
+
55
+
56
+
57
+ ```
58
+
59
+
60
+
61
+ トリガーとなるボタンは以下のように実装しています。
62
+
63
+ ```xhtml
64
+
65
+ <input type="button" class="button grid-09-px button__function button__function--slim" value="打鍵補助用スクリプトの実行" onclick="writeKoumoku()"/>
52
66
 
53
67
  ```
54
68
 

3

文言の修正

2017/08/23 04:41

投稿

strokes_1954
strokes_1954

スコア30

test CHANGED
File without changes
test CHANGED
@@ -58,4 +58,10 @@
58
58
 
59
59
 
60
60
 
61
+ ■追記
62
+
63
+ ⇒上記のxhtml内にボタンを配置し、押下時にonclick属性でjavaScriptを実行し、チェック状態にしたいと考えています。
64
+
65
+
66
+
61
67
  よろしくお願いします。

2

文言の修正

2017/08/22 17:20

投稿

strokes_1954
strokes_1954

スコア30

test CHANGED
File without changes
test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
 
56
56
 
57
- どなたか知識のある方、ご教授ください。
57
+ どなたか知識のある方、選択肢1の状態をcheckedにするjavascriptの実装方法をご教授ください。
58
58
 
59
59
 
60
60
 

1

idの変更

2017/08/22 17:15

投稿

strokes_1954
strokes_1954

スコア30

test CHANGED
File without changes
test CHANGED
@@ -44,11 +44,11 @@
44
44
 
45
45
  //試したもの1
46
46
 
47
- document.getElementById("r51").checked = true;
47
+ document.getElementById("1").checked = true;
48
48
 
49
49
  //試したもの2
50
50
 
51
- $('#r51').prop('checked',true);
51
+ $('#1').prop('checked',true);
52
52
 
53
53
  ```
54
54