• 上标、下标~不常用的 html 标签


    <sup>上标 

    <sub>下标

    <small>小号字

    <del> 删除线

    ======》

    对应的 js 

    stringObj.sup()  上标

    stringObj.sub()  下标

    stringObj.sub()  使用小字号显示

    stringObj.strike() 使用删除线

    彩蛋:

    <!doctype html>
    <html lang="en">
    	<head>
    		<meta charset="UTF-8" />
    		<title>Document</title>
    	</head>
    	<body>
    		<script type="text/javascript">
    			var txt = "z-one"
    
    			document.write("<p>1、Big--大号字体: " + txt.big() + "</p>")
    			document.write("<p>2、Small--小号字体: " + txt.small() + "</p>")
    
    			document.write("<p>3、Bold--粗体: " + txt.bold() + "</p>")
    			document.write("<p>4、Italic--斜体: " + txt.italics() + "</p>")
    
    			document.write("<p>5、Blink--字符串闪动: " + txt.blink() + " (does not work in IE)</p>")
    			document.write("<p>6、Fixed--以打印机文本显示: " + txt.fixed() + "</p>")
    			document.write("<p>7、Strike--删除线: " + txt.strike() + "</p>")
    
    			document.write("<p>8、Fontcolor--字体颜色: " + txt.fontcolor("Red") + "</p>")
    			document.write("<p>9、Fontsize--字体大小: " + txt.fontsize(16) + "</p>")
    
    			document.write("<p>10、Lowercase--转换为小写: " + txt.toLowerCase() + "</p>")
    			document.write("<p>11、Uppercase--转换为大写: " + txt.toUpperCase() + "</p>")
    
    			document.write("<p>12、Subscript--下标: " + txt+txt.sub() + "</p>")
    			document.write("<p>13、Superscript--上标: " +txt+ txt.sup() + "</p>")
    
    			document.write("<p>14、Link--链接: " + txt.link("http://www.cnblogs.com/z-one") + "</p>")
    		</script>
    
    	</body>
    
    </html>
    

    结果:

    学习、交流、记录、编辑一部自己的知识库
  • 相关阅读:
    C# 之委托
    Java Maven安装及配置,利用Maven创建项目
    Java DecimalFormat四舍五入的坑及正确用法
    Java 解析XML的几种方式:DOM、SAX、JDOM和DOM4J。
    Java Properties配置文件和XML配置文件读取
    Java Map一些基本使用方法
    JAVA for循环的几种用法
    鼠标及键盘操作
    控制浏览器
    元素定位
  • 原文地址:https://www.cnblogs.com/z-one/p/6134824.html
Copyright © 2020-2023  润新知