function FontPlus() {
var str = document.getElementById('바꿀div의 id');
var nSize = str.style.fontSize ? str.style.fontSize : '9pt';
var iSize = parseInt(nSize.replace('pt',''));
var str = document.getElementById('바꿀div의 id');
var nSize = str.style.fontSize ? str.style.fontSize : '9pt';
var iSize = parseInt(nSize.replace('pt',''));
if (iSize < 11) {
str.style.fontSize = (iSize + 1) + 'pt';
str.style.lineHeight = '140%';
str.style.fontSize = (iSize + 1) + 'pt';
str.style.lineHeight = '140%';
}else{
alert("더 이상 확대할 수 없습니다.");
}
}
function FontMinus()
{
var str = document.getElementById('마찬가지..');
var nSize = str.style.fontSize ? str.style.fontSize : '9pt';
var iSize = parseInt(nSize.replace('pt',''));
if (iSize > 7){
str.style.fontSize = (iSize - 1) + 'pt';
str.style.lineHeight = '140%';
}else{
alert("더 이상 축소할 수 없습니다.");
}
}
alert("더 이상 확대할 수 없습니다.");
}
}
function FontMinus()
{
var str = document.getElementById('마찬가지..');
var nSize = str.style.fontSize ? str.style.fontSize : '9pt';
var iSize = parseInt(nSize.replace('pt',''));
if (iSize > 7){
str.style.fontSize = (iSize - 1) + 'pt';
str.style.lineHeight = '140%';
}else{
alert("더 이상 축소할 수 없습니다.");
}
}
'Java script' 카테고리의 다른 글
자바스크립트로 한글 길이 구하기 (0) | 2010.04.28 |
---|---|
ie에서 경고창 없이 창 닫기 (0) | 2010.03.12 |
프린터하기 (0) | 2010.02.22 |
인풋박스 클릭할때 무조건 한글로 설정하기 (0) | 2010.02.12 |
쿠키에 아이디 저장하기 (0) | 2010.01.28 |