Predmet:Promjena velcine teksta
PreuzmiIzvorni kôd (Javascript):<!DOCTYPE html>
<html>
<script type="text/javascript">
<!--
function slova(id)
{
var style = window.getComputedStyle(id, null).getPropertyValue('font-size');
var fontSize = parseFloat(style) + "pt";
document.getElementById('bodi').style.fontSize=fontSize;
}
//-->
</script>
<style>
.mala
{
font-size: 8pt;
}
.velika
{
font-size: 25pt;
}
</style>
<body id="bodi">
<h2>Projena velicine slova</h2>
<p id="demo">JavaScript promjena veli
ine slova na stranici</p>
<button type="button"
<button type="button class="mala" onclick="slova(this)">A</button>
<button type="button" class="velika" class="mala" onclick="slova(this)">A</button>
</body>
</html>
Podrska samo putem foruma, jer samo tako i ostali imaju koristi od toga.