Answer the question
In order to leave comments, you need to log in
How to add number 1 to number in txt file?
There is a script:
var number1 = 0;
function plus1() {
var count1 = document.getElementById('count1');
number1++;
count1.innerHTML = number1;
txt_1();
}
function txt_1() {
fs1=require("fs")
fs1.writeFileSync("file/text_1.txt", number1, "ascii")
}
$.ajax({
url: 'text_1.txt',
success: function(data) {
document.getElementById('count1').innerHTML = data;
}
});
var number1 = 0;
var number1 = txt.txt;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question