How can I convert html code to javascript code?

How can I convert this html code

 
<div id="spa">
    <div class="spa-shell-head">
        <div class="spa-shell-head-logo"></div>
        <div class="spa-shell-head-acct"></div>
        <div class="spa-shell-head-search"></div>
    </div>
    <div class="spa-shell-main">
        <div class="spa-shell-main-nav"></div>
        <div class="spa-shell-main-content"></div>
    </div>
    <div class="spa-shell-foot"></div>
    <div class="spa-shell-chat"></div>
    <div class="spa-shell-modal"></div>
</div>


to

javascript code?

var html = String()
+'<div id="spa">'
    +'<div class="spa-shell-head">'
        +'<div class="spa-shell-head-logo"></div>'
        +'<div class="spa-shell-head-acct"></div>'
        +'<div class="spa-shell-head-search"></div>'
    +'</div>'
    +'<div class="spa-shell-main">'
        +'<div class="spa-shell-main-nav"></div>'
        +'<div class="spa-shell-main-content"></div>'
    +'</div>'
    +'<div class="spa-shell-foot"></div>'
    +'<div class="spa-shell-chat"></div>'
    +'<div class="spa-shell-modal"></div>'
 
+'</div>'

Is there any easy way to macro or function?

Please sign in to leave a comment.