当前位置:开发者网络 >> 网页特效 >> 文本特效 >> 内容
精彩推荐
分类最新特效
分类热点特效
  
输入框字体的控制
日期:2005-06-21   人气:   【字体: 】【收藏此文


<!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! -->
<!-- 要实现此效果需要 1 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<select id='fontslt' onchange='NYSfont()'><option>选择阅读字体
<script language=javascript>
for (i=9;i<200;i++)
{document.write("<option value="+i+">"+i+"pt字体\n");}
function NYSfont()
{if((fontslt.selectedIndex!=-1)&&(fontslt.selectedIndex!=0)){readcontent.style.fontSize=fontslt.options[fontslt.selectedIndex].value;}}
</script></select>

<p>
<textarea id='readcontent' rows="15" cols="100">这里的字体应该随选择变化