<!doctype html> <html lang = "en"> <head> <meta charset = "utf -8"> <title> 1日あたり1つのJavaScriptインスタンス - 各行にテキストの文字を処理します</title> <script> function clicka(){console.log( "aaa"); var aa = document.getElementById( "text"); var lines = aa.value.split( "/n"); var bbb = document.getElementById( "result"); var string = ""; for(i = 0; i <lines.length; i ++){string+= lines [i]+"<br/>"; //// </br>および<br/>は<br/>} bbb.innerhtml = string} </script> </head> <body> <textare> <text "placehold of" placehold of text "text" pelacehold> <body> <texter> < "result"> </div> <a href = "javascript:void(0);" onclick = "Clicka()">ハンドルラインブレーク</a> </body> </html>