Created
August 16, 2019 08:51
-
-
Save ynishi2014/f9a642f18a143b3fccdd65947a77ec03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeQuizExec(){ | |
var min = parseInt(jQuery("#math_gen_min").val()); | |
var max = parseInt(jQuery("#math_gen_max").val()); | |
var op = jQuery("[name=op]:checked").val(); | |
var count = parseInt(jQuery("#math_gen_count").val()); | |
jQuery("#math_gen_result").val(makeQuizN(min, max, op, count)); | |
} | |
function handleDownload(){ | |
var data = jQuery("#math_gen_result").val(); | |
var blob = new Blob([data], {type: "text/plain"}); | |
var a = document.createElement("a"); | |
a.href = URL.createObjectURL(blob); | |
a.target = '_blank'; | |
a.download = 'quiz.txt'; | |
a.click(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment