📄 17.4.1 createcaption方法.html
字号:
<body>
<form name="frm">
<input type="text" name="txt" />
<input type="button" value="添加" onclick="addCaption()"/>
</form>
<table id="otable" border="1">
<tr>
<td>hello,how are you</td><td>you are welcome</td>
</tr>
<tr>
<td>to</td><td>Javascript</td>
</tr>
</table>
<script>
function addCaption()
{
var otable=document.all.otable;
var txt=document.frm.txt.value;
var ocap=otable.createCaption();
ocap.innerHTML=txt.bold();
}
</script>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -