javascript to control text display
- 2020-06-03 05:47:23
- OfStack
Part of the site content page will usually see the control text is displayed in large, medium, small 3 ways, the following is the small function to do 1 record, to improve the site user experience or 1 help oh!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js Control text display </title>
</head>
<body>
<script language="javascript">
function setFontSize(objID,size){
document.getElementById(objID).style.fontSize=size+'px';
}
</script>
<div id="content">
<p> The database ( mainly MySQL and Access The database ),javascript,jquery,div+css,html,windows system ,linux Systematic study notes and life experience accumulation in health and wellness !</p>
</div>
<a onclick="setFontSize('content',20)"> big </a>
<a onclick="setFontSize('content',14)"> In the </a>
<a onclick="setFontSize('content',12)"> small </a>
</body>
</html>
This is the end of this article, I hope you enjoy it.