Line | |
---|
1 | function CopyCode(key)
|
---|
2 | {
|
---|
3 | var trElements = document.getElementsByTagName("tr");
|
---|
4 | var i;
|
---|
5 | for(i = 0; i < trElements.length; ++i)
|
---|
6 | {
|
---|
7 | if(key.parentNode.parentNode.parentNode == trElements[i].parentNode)
|
---|
8 | {
|
---|
9 | window.clipboardData.setData("Text", trElements[i].innerText);
|
---|
10 | }
|
---|
11 | }
|
---|
12 | }
|
---|
13 |
|
---|
14 | function ChangeCopyCodeIcon(key)
|
---|
15 | {
|
---|
16 | var i;
|
---|
17 | var imageElements = document.getElementsByName("ccImage")
|
---|
18 | for(i=0; i<imageElements.length; ++i)
|
---|
19 | {
|
---|
20 | if(imageElements[i].parentNode == key)
|
---|
21 | {
|
---|
22 | if(imageElements[i].src == copyImage.src)
|
---|
23 | {
|
---|
24 | imageElements[i].src = copyHoverImage.src;
|
---|
25 | imageElements[i].alt = copyHoverImage.alt;
|
---|
26 | }
|
---|
27 | else
|
---|
28 | {
|
---|
29 | imageElements[i].src = copyImage.src;
|
---|
30 | imageElements[i].alt = copyImage.alt;
|
---|
31 | }
|
---|
32 | }
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.