Newer
Older
2021-taka-game / js / json.js
@Takashi Kumakawa Takashi Kumakawa on 22 Oct 2021 560 bytes Update json.js
var lines = [];
var out = "";

function enter(){
  var text = document.getElementById("textbox");
  lines.push(text.value);
  console.log(text.value);
  console.log(lines);
  text.value = "";
}

function end() {
  out = JSON.stringify(lines);
  target = document.getElementById("output");
  target.innerText = out;
  console.log("end");
}

/*
function onButtonClick() {
  target = document.getElementById("output");
  target.innerText = document.forms.id_form1.id_textBox1.value;
  //target.innerText = document.id_form1.id_textBox1.value;//これでもOK
}*/