OLD | NEW |
| 1 <html> |
| 2 <head></head> |
| 3 <body> |
| 4 |
1 <textarea id='id_message'> | 5 <textarea id='id_message'> |
2 </textarea> | 6 </textarea> |
3 | 7 |
4 <object id="plugin" | 8 <object id="plugin" |
5 tabindex="0" | 9 tabindex="0" |
6 type="application/browser-plugin" | 10 type="application/browser-plugin" |
7 width="240" | 11 width="240" |
8 height="120" | 12 height="120" |
9 style='border: solid 1px red' | 13 style='border: solid 1px red' |
10 > | 14 > |
11 </object> | 15 </object> |
12 | 16 |
13 <script> | 17 <script> |
14 function dragLocation() { | 18 function dragLocation() { |
15 return [id_message.offsetLeft + id_message.offsetWidth / 2, | 19 return [id_message.offsetLeft + id_message.offsetWidth / 2, |
16 id_message.offsetTop + id_message.offsetHeight / 2]; | 20 id_message.offsetTop + id_message.offsetHeight / 2]; |
17 } | 21 } |
18 | 22 |
19 function dropLocation() { | 23 function dropLocation() { |
20 return [plugin.offsetLeft + plugin.offsetWidth / 2, | 24 return [plugin.offsetLeft + plugin.offsetWidth / 2, |
21 plugin.offsetTop + plugin.offsetHeight / 2]; | 25 plugin.offsetTop + plugin.offsetHeight / 2]; |
22 } | 26 } |
23 | 27 |
24 function SetSrc(src) { | 28 function SetSrc(src) { |
25 plugin = document.getElementById('plugin'); | 29 plugin = document.getElementById('plugin'); |
26 plugin.src = src; | 30 plugin.src = src; |
27 } | 31 } |
28 </script> | 32 </script> |
| 33 |
| 34 </body> |
| 35 </html> |
OLD | NEW |