LoginSignup
1
0

More than 5 years have passed since last update.

JavaScript 複数行テキストを扱う

Last updated at Posted at 2018-02-17

JavaScriptで複数行テキストを変数に追加する方法

var insertHTML ='<div class="panel-group">'+
                'hogehoge'+
                '</div>';

$('#idname').append(insertHTML);

1行1行文字列を「+」演算子で連結

※バックスラッシュで連結する方法もあるがGoogle JavaScript Style GuideでNG
Google JavaScript Style Guide

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0