出来れば、良いのにね。読込。コピペなら出来るのに、あっても出来ないし。
Discussion
HTML
<input type="text" name="text1" value="Please write the directory." id="my_text1" onchange="text_Changed(value)"><br>
<input type="file" onchange="file_Changed(value)"><br>
<!--<span id="my_inna_text">てきすと<span><br>-->
<textarea name="txt" cols="40" rows="5" id="mytextarea"></textarea><br>
<hr>
<b>form</b><br>
<form name="my_form_0">
<input type="file" id="selfile" accept=".txt" onchange="text_read(value)">
<span id="errmessage">errmessage</span><br>
<input type="radio" checked onchange="radio_glope1(1,checked)">Radio1 <input type="radio" onchange="radio_glope1(2,checked)">Radio2<br>
<input type="file" onchange="fileChanged(value)"><br>
<textarea name="txt" cols="40" rows="5" class="mytextr"></textarea>
<input type="button" value="change" onclick="winopen1()">
<div id="my_div1"><iframe src="./text/me_text0.html" id="me_text" value=this></iframe></div>
</form>
<hr>
<span id="my_in_a_text" onclick="it_test2('test')">てきすと</span><br>
<!--<span id="my_inna_text" onclick="alert('it chenge!!');">てきすと<span><br>-->
<input type="button" value="テキストリード" onclick="read()"><br>
<p id="mfl">x</p>
<p id="f_name">filename</p><br>
<div class="image-list">image-list</div>
function winopen1() {
alert("in_iku")
document.querySelector('#my_div1').innerHTML = '<iframe src="./text/steping.txt" id="me_text" value=this></iframe>';
document.forms[0].elements[4].value = document.getElementById("me_text").value;
}
// form end
// no coll
function read() {
alert("my_mese"+fail_name);
let redotext = document.querySelector('.mytextr').value;
// document.querySelector('#mfl').innerHTML = redotext.replace(/\n/g, '<br>');
let readlin = [];
readlin[0] = '';
let ii = 0;
for (let i = 0; i < redotext.length; i++) {
if (!redotext[i].includes('\n')) {
readlin[ii] += redotext[i];
} else {
ii++;
readlin[ii] = '';
}
}
document.querySelector('#mfl').innerHTML = readlin;
}
妄想論を書きました。me.txt から、text value に読み込めれば良いだけだが、知らんし。
0