zoukankan      html  css  js  c++  java
  • JavaScript 为字符串添加样式 【每日一段代码80】

    <html>
    <head>
    <title>为字符串添加样式</title>
    <body>
    <script type="text/javascript">
    var txt="wo li ge ca ca ca!";

    document.write("<p>Big: "+txt.big()+"</p>");
    document.write("<p>Small: "+txt.small()+"</p>");

    document.write("<p>Bold: "+txt.bold()+"</p>");
    document.write("<p>Italic: "+txt.italics()+"</p>");

    document.write("<p>Blink: "+txt.blink()+"(does not work in IE</p>");
    document.write("<p>Fixed: "+txt.fixed()+"</p>");
    document.write("<p>Strike: "+txt.strike()+"</p>");

    document.write("<p>Fontcolor: "+txt.fontcolor("Red")+"</p>");
    document.write("<p>Fontsize: "+txt.fontsize(16)+"</p>");

    document.write("<p>Lowercase: "+txt.toLowerCase()+"</p>");
    document.write("<p>Uppercase: "+txt.toUpperCase()+"</p>");

    document.write("<p>Subscript: "+txt.sub()+"</p>");
    document.write("<p>Superscript: "+txt.sup()+"</p>");

    document.write("<p>Link: "+txt.link("http://cui.li/")+"</p>");
    </script>

    </body>
    </html>

  • 相关阅读:
    linux 命令展示该目录下的所有子目录及文件结构 tree
    ssh-keygen
    centos安装git
    spring-boot parent变更为依赖方式
    centos docker compose安装
    UML——活动图
    UML——构件图
    UML——部署图
    UML——用例图
    UML——关系
  • 原文地址:https://www.cnblogs.com/naokr/p/2443020.html
Copyright © 2011-2022 走看看