質問編集履歴
2
ドメイン修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
```html
|
2
|
-
<img src="http://
|
2
|
+
<img id="a" src="http://example.com">
|
3
|
-
<img src="http://
|
3
|
+
<img id="b" src="http://example.com">
|
4
|
-
<img src="http://
|
4
|
+
<img id="c" src="http://example.com">
|
5
5
|
<input type="button" id="button">
|
6
6
|
<p id="pinput"></p>
|
7
7
|
```
|
8
8
|
```javascript
|
9
9
|
//coffeescriptで記述
|
10
10
|
$("#button").click ->
|
11
|
-
$("#pinput").val() //= <img src="http://
|
11
|
+
$("#pinput").val() //= <img id="a" src="http://example.com">
|
12
12
|
```
|
13
13
|
のように始めに出てきたタグを取得するにはどうすればよいでしょうか?
|
1
ドメインをexampleに修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
```html
|
2
|
-
<img src="http://
|
2
|
+
<img src="http://examplea.com">
|
3
|
-
<img src="http://
|
3
|
+
<img src="http://exampleb.com">
|
4
|
-
<img src="http://
|
4
|
+
<img src="http://examplec.com">
|
5
5
|
<input type="button" id="button">
|
6
6
|
<p id="pinput"></p>
|
7
7
|
```
|
8
8
|
```javascript
|
9
9
|
//coffeescriptで記述
|
10
10
|
$("#button").click ->
|
11
|
-
$("#pinput").val() //= <img src="http://
|
11
|
+
$("#pinput").val() //= <img src="http://examplea.com">
|
12
12
|
```
|
13
13
|
のように始めに出てきたタグを取得するにはどうすればよいでしょうか?
|