설명 없음

FORS_XRF.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. function Load(){
  2. imageLoad();
  3. create_colors();
  4. }
  5. function imageLoad(){
  6. // var link = getUrlVars()["link"];
  7. var link = "./nier.jpg"
  8. var body = document.getElementById('image');
  9. var image = document.createElement('img');
  10. image.setAttribute("class", "image");
  11. image.src = link;
  12. body.appendChild(image);
  13. }
  14. function getUrlVars() {
  15. var vars = {};
  16. var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
  17. vars[key] = value;
  18. });
  19. return vars;
  20. }
  21. function show_XRF(){
  22. var x = document.getElementById("XRFcolors");
  23. var y = document.getElementById("FORScolors");
  24. if (x.style.display === "none") {
  25. x.style.display = "block";
  26. y.style.display = "none";
  27. } else {
  28. x.style.display = "none";
  29. }
  30. }
  31. function show_FORS(){
  32. var x = document.getElementById("FORScolors");
  33. var y = document.getElementById("XRFcolors");
  34. if (x.style.display === "none") {
  35. x.style.display = "block";
  36. y.style.display = "none";
  37. } else {
  38. x.style.display = "none";
  39. }
  40. }
  41. function buttons_colors(){
  42. // var buttons = document.getElementById('XRFcolors');
  43. // var newNode = document.createElement('button');
  44. // newNode.setAttribute("class", "colors");
  45. // newNode.appendChild(document.createTextNode(line));
  46. // buttons.appendChild(newNode);
  47. // var buttons = document.getElementById('FORScolors');
  48. // var newNode = document.createElement('button');
  49. // newNode.setAttribute("class", "colors");
  50. // newNode.appendChild(document.createTextNode(line));
  51. // buttons.appendChild(newNode);
  52. console.log("hi")
  53. }