Phiên bản đầy đủ: jsB@nk » » Đổi chữ cơ bản
URL: https://www.javascriptbank.com/document-text-modifier.html
Công cụ dùng để định các dạng cơ bản cho chữ trên một trang web dành cho người truy cập như phóng to/thu nhỏ, in đậm,...
Phiên bản đầy đủ: jsB@nk » » Đổi chữ cơ bản
URL: https://www.javascriptbank.com/document-text-modifier.html
<STYLE type=text/css>INPUT {FONT-WEIGHT: bold; FONT-SIZE: 14px; WIDTH: 65px; COLOR: black; BACKGROUND-COLOR: white}SPAN {FONT-SIZE: 14px}TABLE {BORDER-RIGHT: black 2px outset; BORDER-TOP: black 2px outset; FONT-WEIGHT: bold; BORDER-LEFT: black 2px outset; COLOR: black; BORDER-BOTTOM: black 2px outset; BACKGROUND-COLOR: lightyellow}</STYLE><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<SCRIPT language=JavaScript type=text/javascript><!--var textsize=14;var increase=5;var decrease=5;var origin=textsize;window.document.onkeypress=main;function main(){switch(event.keyCode){ case 101:case 69:case 43: enlarge();break; case 115:case 83:case 45: shrink();break; case 111:case 79:case 42:orig();break; case 98:case 66:makecolor("blue");break; case 82:case 114: makecolor("red");break; case 68:case 100: makecolor("black");break; case 71:case 103: makecolor("green");break;}}function enlarge(){ textsize>100?window.alert("Too Large"):document.getElementById('sid0').style.fontSize=textsize+=increase;}function shrink(){ textsize<5?window.alert("Too Small"):document.getElementById('sid0').style.fontSize=textsize-=decrease;}function orig(){ document.getElementById('sid0').style.fontSize=origin; textsize=origin;}function makecolor(COLOR){ document.getElementById('sid0').style.color=COLOR;}//--></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<TABLE> <THEAD> <TR style="COLOR: lightyellow; BACKGROUND-COLOR: black"> <TD>Function</TD> <TD>Key to Press</TD></TR></THEAD> <TBODY> <TR> <TD>Zoom in</TD> <TD>+ or e </TD></TR> <TR> <TD>Zoom out</TD> <TD>- or s </TD></TR> <TR> <TD>Default size</TD> <TD>* or o </TD></TR> <TR> <TD>Blue</TD> <TD>b </TD></TR> <TR> <TD>Red</TD> <TD>r </TD></TR> <TR> <TD>Black</TD> <TD>d </TD></TR> <TR> <TD>Green</TD> <TD>g </TD></TR></TBODY></TABLE><BR><SPAN id=sid0 name="span">Text change </SPAN><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->