回答編集履歴

1

Imageのコンストラクタの誤り訂正

2016/06/20 02:31

投稿

masaya_ohashi
masaya_ohashi

スコア9206

test CHANGED
@@ -6,11 +6,27 @@
6
6
 
7
7
 
8
8
 
9
+ //画像
10
+
11
+ var image1 = new Image();
12
+
13
+ image1.src = "sample1.jpg";
14
+
15
+ var image2 = new Image();
16
+
17
+ image2.src = "sample2.jpg";
18
+
19
+ var image3 = new Image();
20
+
21
+ image3.src = "sample3.jpg";
22
+
23
+
24
+
9
25
  // オブジェクトを格納
10
26
 
11
27
  list.push({
12
28
 
13
- imageData:new Image("sample1.jpg"),
29
+ imageData:image1,
14
30
 
15
31
  textData:"sample1の画像の文字列"
16
32
 
@@ -18,7 +34,7 @@
18
34
 
19
35
  list.push({
20
36
 
21
- imageData:new Image("sample2.jpg"),
37
+ imageData:image2,
22
38
 
23
39
  textData:"sample2の画像の文字列"
24
40
 
@@ -26,7 +42,7 @@
26
42
 
27
43
  list.push({
28
44
 
29
- imageData:new Image("sample3.jpg"),
45
+ imageData:image3,
30
46
 
31
47
  textData:"sample3の画像の文字列"
32
48