相关文章:

JavaScript String.bold() 函数详解

代码类型:

杂项:

  • 启用CSS/JS语法检查
  • 监测脚本运行错误
  • 禁止库文件重复

文档类型:

JS库文件:

手动添加:

     
    1
    xxxxxxxxxx
    11
     
    1
    //在当前页面内追加换行标签和指定的HTML内容
    2
    function w( html ){
    3
        document.body.innerHTML += "<br/>" + html;
    4
    }
    5
    6
    7
    var str = "Google搜索引擎";
    8
    w( str.bold() ); // <b>Google搜索引擎</b>
    9
    10
    str = "CodePlayer";
    11
    w( str.bold() ); // <b>CodePlayer</b>
    xxxxxxxxxx
    1
     
    1