Home >Web Front-end >HTML Tutorial >Detailed explanation of JavaScript splicing html fragments using backslash examples
JS uses "\" backslash splicing
$('#result_ok').append('<p>\ 预约挂号医院:西安市第八医院\ </p>\ <p>\ 预约挂号科室:皮肤科-1科室 皮肤科\ </p>\ <p>\ 预约挂号医生:<label>皮肤科-医生001</label> \ </p>\ <p>\ 预约医生级别:<label>名老专家</label> \ </p>\ <p>\ 诊金及挂号费:\ <label>\ 100\ </label>\ 元\ </p>\ <p>\ 预约就诊时间:\ <label>\ 2015-05-25\ </label>\ <label>\ 上午 8:00~12:00\ </label>\ </p>');
It can run normally and is equivalent to str+="e388a4556c0f65e1904146cc1a846bee". Each line must have the fixed format of str+=, which must be simplified (lazy)
The above is the detailed content of Detailed explanation of JavaScript splicing html fragments using backslash examples. For more information, please follow other related articles on the PHP Chinese website!