相关搜索 删除:用java script编写函数实现将字体动态变为粗体

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/22 02:47:14
字体变化函数
1,font_move_on()
鼠标移过来的时候,文字字体变为粗体
2,font_move_out()
鼠标移走的时候,文字字体变为细体

<script language="JavaScript">
function cFont(obj,flag)
{
obj.style.fontWeight = (flag == 1) ? 'bold' : 'normal';
}
</script>
<div onmouseout="cFont(this, 0);" onmouseover="cFont(this, 1);">11111111111111</div>