|
字号缩放代码
''''zoom'''').style.fontSize=size+''''px''''中的双引号改为单引号
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> <script type="text/javascript"> function doZoom(size) {document.getElementById(''''zoom'''').style.fontSize=size+''''px'''';} </script> </head> <body> <span id="zoom">需要指定大小的文字</span> <a href="javascript:doZoom(16)" _fcksavedurl="javascript:doZoom(16)">大</a> <a href="javascript:doZoom(14)" _fcksavedurl="javascript:doZoom(14)">中</a> <a href="javascript:doZoom(12)" _fcksavedurl="javascript:doZoom(12)">小</a> </body> </html>
|