В этой статье описывается метод простого настройки размера шрифта веб -страниц JS. Поделитесь этим для вашей ссылки, следующим образом:
//var tgs = new Array('div','td','tr');var tgs = new Array('td','tr');//Specify spectrum of different font sizes://var szs = new Array('xx-small','x-small','small','medium','large','x-large','x-large','xx-large' ); var szs = new Array ('10px', '12px', '14px', '16px', '18px', '20px', '22px'); var starsz = 2; function tsize (trgt, inc) {if (! document.getElementById) {return} var d = документ, cel = null, sz = js, is, я; // sz += inc; sz = inc; if (sz <0) {sz = 0; } if (sz> 6) {sz = 6; } Startsz = sz; if (! (cel = d.getelementbyid (trgt))) cel = d.getelementsbytagname (trgt) [0]; cel.style.fontsize = szs [sz]; for (i = 0; i <tgs.length; i ++) {ctags = cel.getelementsbytagname (tgs [i]); for (j = 0; j <ctags.length; j ++) {ctags [j] .style.fontsize = szs [sz]; }}}Как использовать:
<td> <a href = "javascript: tsize ('body', 0)"> <img src = "../ Image/fsize1of.gif" name = "fsize1" id = "fsize1" onmouseover = "mm_swapimage ('fsize1', '', '../image/fsize1on.gif', 1)" onmouseout = "mm_swapimgrestore ()"> </a> </td>For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of Алгоритмы и методы обхода JavaScript »и« Сводка использования математических операций JavaScript ».
Я надеюсь, что эта статья будет полезна для каждого программирования JavaScript.