&reg becomes ® in jQuery

This question already has an answer here:

  • Encode URL in JavaScript? 12 answers

  • 在将html附加到existingDiv之后, 快速修复将作为第二步添加标签 - 请参阅下面的演示:

    var strURL = 'http://financials.morningstar.com/ratios/r.htmlt=tup&region=usa&culture=en-US';
    var str = '<li>';
    str += '<label style="font-family:Arial;">' + '</label>';
    str += '</li>';
    $('#existingDiv').append(str);
    $('#existingDiv label').text(strURL);
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <div id="existingDiv"></div>
    链接地址: http://www.djcxy.com/p/26542.html

    上一篇: 将有效的网址编码为有效的路径名

    下一篇: &reg在jQuery中变得®