當前位置:首頁 » 網站資訊 » 程序員怎麼控制網站字體大

程序員怎麼控制網站字體大

發布時間: 2024-06-18 01:34:54

❶ 紼嬪簭鍛樺繀欏葷煡閬撶殑HTML甯哥敤浠g爜鏈夊摢浜

html+css浠g爜
鏂囨湰璁劇疆
1銆乫ont-size: 瀛楀彿鍙傛暟
2銆乫ont-style: 瀛椾綋鏍煎紡
3銆乫ont-weight: 瀛椾綋綺楃粏
4銆侀滆壊灞炴
color: 鍙傛暟
娉ㄦ剰浣跨敤緗戦〉瀹夊叏鑹

瓚呴摼鎺ヨ劇疆
text-decoration: 鍙傛暟
涓昏佺敤閫旀槸鏀瑰彉嫻忚堝櫒鏄劇ず鏂囧瓧閾炬帴鏃剁殑涓嬪垝綰褲
鍙傛暟鍙栧艱寖鍥達細
underline錛氫負鏂囧瓧鍔犱笅鍒掔嚎
overline錛氫負鏂囧瓧鍔犱笂鍒掔嚎
line-through錛氫負鏂囧瓧鍔犲垹闄ょ嚎
blink錛氫嬌鏂囧瓧闂鐑
none錛氫笉鏄劇ず涓婅堪浠諱綍鏁堟灉

鑳屾櫙
1銆佽儗鏅棰滆壊
background-color: 鍙傛暟
2銆佽儗鏅鍥劇墖
background-image: url(URL)
URL灝辨槸鑳屾櫙鍥劇墖鐨勫瓨鏀捐礬寰勶紝none琛ㄧず鏃犮
3銆佽儗鏅鍥劇墖閲嶅
background-repeat: 鍙傛暟
鍙傛暟鍙栧艱寖鍥 錛
no-repeat錛氫笉閲嶅嶅鉤閾鴻儗鏅鍥劇墖
repeat-x錛氫嬌鍥劇墖鍙鍦ㄦ按騫蟲柟鍚戜笂騫抽摵
repeat-y錛氫嬌鍥劇墖鍙鍦ㄥ瀭鐩存柟鍚戜笂騫抽摵
濡傛灉涓嶆寚瀹氳儗鏅鍥劇墖閲嶅嶅睘鎬э紝嫻忚堝櫒榛樿ょ殑鏄鑳屾櫙鍥劇墖鍚戞按騫熾佸瀭鐩翠袱涓鏂瑰悜涓婂鉤閾恆
4銆佽儗鏅鍥劇墖鍥哄畾
鑳屾櫙鍥劇墖鍥哄畾鎺у埗鑳屾櫙鍥劇墖鏄鍚﹂殢緗戦〉鐨勬粴鍔ㄨ屾粴鍔ㄣ傚傛灉涓嶈劇疆鑳屾櫙鍥劇墖鍥哄畾灞炴э紝嫻忚堝櫒榛樿よ儗鏅鍥劇墖闅忕綉欏電殑婊氬姩鑰屾粴鍔ㄣ備負浜嗛伩鍏嶈繃浜庤姳鍝ㄧ殑鑳屾櫙鍥劇墖鍦ㄦ粴鍔ㄦ椂杞縐繪祻瑙堣呯殑娉ㄦ剰鍔涳紝涓鑸閮借句負鍥哄畾
background-attachment: 鍙傛暟
鍙傛暟鍙栧艱寖鍥達細
fixed錛氱綉欏墊粴鍔ㄦ椂錛岃儗鏅鍥劇墖鐩稿逛簬嫻忚堝櫒鐨勭獥鍙h岃█錛屽滻瀹氫笉鍔
scroll錛氱綉欏墊粴鍔ㄦ椂錛岃儗鏅鍥劇墖鐩稿逛簬嫻忚堝櫒鐨勭獥鍙h岃█錛屼竴璧鋒粴鍔

鍖哄潡
1銆佸崟璇嶉棿璺
word-spacing: 闂撮殧璺濈
2銆佸瓧姣嶉棿璺
letter-spacing: 瀛楁瘝闂磋窛
3銆佹枃鏈瀵歸綈
text-align: 鍙傛暟
鍙傛暟鐨勫彇鍊礆細
left錛氬乏瀵歸綈
right錛氬彸瀵歸綈
center錛氬眳涓瀵歸綈
justify錛氱浉瀵瑰乏鍙沖歸綈
4銆佸瀭鐩村歸綈
vertical-align: 鍙傛暟
top錛氶《瀵歸綈
bottom錛氬簳瀵歸綈
text-top錛氱浉瀵規枃鏈欏跺歸綈
text-bottom錛氱浉瀵規枃鏈搴曞歸綈
baseline錛氬熀鍑嗙嚎瀵歸綈
middle錛氫腑蹇冨歸綈
sub錛氫互涓嬫爣鐨勫艦寮忔樉紺
super錛氫互涓婃爣鐨勫艦寮忔樉紺
5銆佹枃鏈緙╄繘
text-indent: 緙╄繘璺濈
12px鐩稿綋浜庝竴涓鏂囧瓧璺濈
6銆佺┖鏍
white-space: 鍙傛暟
normal 姝e父
pre 淇濈暀
nowrap 涓嶆崲琛
7銆佹樉紺烘牱寮
display: 鍙傛暟
鍙傛暟鍙栧艱寖鍥達細
block錛氬潡綰у厓緔狅紝鍦ㄥ硅薄鍓嶅悗閮芥崲琛
inline錛氬湪瀵硅薄鍓嶅悗閮戒笉鎹㈣
list-item錛氬湪瀵硅薄鍓嶅悗閮芥崲琛岋紝澧炲姞浜嗛」鐩絎﹀彿
none錛氭棤鏄劇ず

鏂規
1銆乭eight 楂樺害
2銆亀idth 瀹藉害
3銆乸adding 鍐呰竟璺
4銆乵argin 澶栬竟璺
5銆乫loat錛堟誕鍔錛夛細鍙浠ヨ╁潡綰у厓緔犲湪涓琛屼腑鎺掑垪錛屼緥濡傛í鍚戣彍鍗曘
6銆乧lear 娓呴櫎嫻鍔

杈規
1銆佹牱寮
border style 鍙傛暟
杈規嗘牱寮忕殑鍙傛暟錛
none錛氭棤杈規
dotted錛氳竟妗嗕負鐐圭嚎
dashed錛氳竟妗嗕負闀跨煭綰
solid錛氳竟妗嗕負瀹炵嚎
double錛氳竟妗嗕負鍙岀嚎
2銆佸藉害
border width 鍙傛暟
3銆侀滆壊
border color 鍙傛暟

鍒楄〃
list-style-type 鍒楄〃鏍峰紡
涓嶅悓嫻忚堝櫒鐨勫垪琛ㄧ﹀彲鑳戒笉鐩稿悓錛屽彲鑳戒細褰卞搷鍒扮綉欏碉紝鎵浠ョ綉欏典腑鐨勫垪琛ㄥぇ澶氶兘鏄鐢辮儗鏅鍥劇墖鏄劇ず銆
鎺у埗鐢ㄦ埛鐣岄潰鐨勬牱寮

榧犳爣
cursor錛氶紶鏍囧艦鐘跺弬鏁
CSS榧犳爣褰㈢姸鍙傛暟琛錛
榧犳爣褰㈢姸錛欳SS浠g爜
style="cursor:hand" 銆銆銆銆銆鎵嬪艦
style="cursor:crosshair" 銆銆鍗佸瓧褰
style="cursor:text" 銆銆銆銆銆鏂囨湰褰
style="cursor:wait" 銆銆銆銆銆娌欐紡褰
style="cursor:move" 銆銆銆銆鍗佸瓧綆澶村艦錛
style="cursor:help" 銆銆銆銆銆闂鍙峰艦
style="cursor:e-resize" 銆銆銆鍙崇澶村艦
style="cursor:n-resize" 銆銆銆涓婄澶村艦
style="cursor:nw-resize" 銆銆宸︿笂綆澶村艦
style="cursor:w-resize" 銆銆銆宸︾澶村艦
style="cursor:s-resize" 銆銆銆涓嬬澶村艦
style="cursor:se-resize" 銆銆鍙充笅綆澶村艦
style="cursor:sw-resize" 銆銆宸︿笅綆澶村艦

HTML甯哥敤浠g爜涔嬶細緇撴瀯鎬у畾涔
鏂囦歡綾誨瀷<HTML></HTML> 錛堟斁鍦ㄦ。妗堢殑寮澶翠笌緇撳熬錛
鏂囦歡涓婚<TITLE></TITLE> 錛堝繀欏繪斁鍦ㄣ屾枃澶淬嶅尯鍧楀唴錛
鏂囧ご<HEAD></HEAD> 錛堟弿榪版ц祫鏂欙紝鍍忔槸銆屼富棰樸嶏級
鏂囦綋<BODY></BODY> 錛堟枃浠舵湰浣擄級
鏍囬<H?></H?> 錛堜粠1鍒6錛屾湁鍏灞傞夋嫨錛
鏍囬樼殑瀵歸綈 <H?ALIGN=LEFT|CENTER|RIGHT></H?>
鍖哄垎<DIV></DIV>
鍖哄垎鐨勫歸綈 <DIVALIGN=LEFT|RIGHT|CENTER|JUSTIFY></DIV>
寮曟枃鍖哄潡<BLOCKQUOTE></BLOCKQUOTE> 錛堥氬父浼氬唴緙╋級
寮鴻皟<EM></EM> 錛堥氬父浼氫互鏂滀綋鏄劇ず錛
鐗瑰埆寮鴻皟<STRONG></STRONG> 錛堥氬父浼氫互鍔犵矖鏄劇ず錛
寮曟枃<CITE></CITE> 錛堥氬父浼氫互鏂滀綋鏄劇ず錛
鐮<CODE></CODE> 錛堟樉紺哄師濮嬬爜涔嬬敤錛
鏍鋒湰<SAMP></SAMP>
閿鐩樿緭鍏<KBD></KBD>
鍙樻暟<VAR></VAR>
瀹氫箟<DFN></DFN> 錛堟湁浜涙祻瑙堝櫒涓嶆彁渚涳級
鍦板潃 <ADDRESS></ADDRESS>
澶у瓧<BIG></BIG>
灝忓瓧<SMALL></SMALL>
涓庡栬傜浉鍏崇殑鏍囩撅紙浣滆呰嚜璁㈢殑琛ㄧ幇鏂瑰紡錛
鍔犵矖<B></B>
鏂滀綋<I></I>
搴曠嚎<U></U> 錛堝皻鏈変簺嫻忚堝櫒涓嶆彁渚涳級
鍒犻櫎綰<S></S> 錛堝皻鏈変簺嫻忚堝櫒涓嶆彁渚涳級
涓嬫爣<SUB></SUB>
涓婃爣<SUP></SUP>
鎵撳瓧鏈轟綋<TT></TT> 錛堢敤鍗曠┖鏍煎瓧鍨嬫樉紺猴級
棰勫畾鏍煎紡<PRE></PRE> 錛堜繚鐣欐枃浠朵腑絀烘牸鐨勫ぇ灝忥級
棰勫畾鏍煎紡鐨勫藉害<PRE WIDTH=?></PRE>錛堜互瀛楀厓璁$畻錛
鍚戜腑鐪嬮綈<CENTER></CENTER> 錛堟枃瀛椾笌鍥劇墖閮藉彲浠ワ級
闂鑰<BLINK></BLINK> 錛堟湁鍙蹭互鏉ユ渶琚鍢插紕鐨勬爣絳撅級
瀛椾綋澶у皬 <FONTSIZE=?></FONT>錛堜粠1鍒7錛
鏀瑰彉瀛椾綋澶у皬 <FONTSIZE=+|-?></FONT>
鍩烘湰瀛椾綋澶у皬 <BASEFONTSIZE=?> 錛堜粠1鍒7; 鍐呭畾涓3錛
瀛椾綋棰滆壊 <FONTCOLOR="#$$"></FONT>錛$$涓洪滆壊浠g爜錛

HTML甯哥敤浠g爜涔嬶細淇鏀歸〉闈㈢殑瀹炵敤鎬HTML浠g爜
璐村浘錛<img src="鍥劇墖鍦板潃">
鍔犲叆榪炴帴錛<a href="鎵瑕佽繛鎺ョ殑鐩稿叧鍦板潃">鍐欎笂浣犳兂鍐欑殑瀛</a>
鍦ㄦ柊紿楀彛鎵撳紑榪炴帴錛<a href="鐩稿叧鍦板潃" target="_blank">鍐欎笂瑕佸啓鐨勫瓧</a>
縐誨姩瀛椾綋(璧伴┈鐏)錛<marquee>鍐欎笂浣犳兂鍐欑殑瀛</marquee>
瀛椾綋鍔犵矖錛<b>鍐欎笂浣犳兂鍐欑殑瀛</b>
瀛椾綋鏂滀綋錛<i>鍐欎笂浣犳兂鍐欑殑瀛</i>
瀛椾綋涓嬪垝綰: <u>鍐欎笂浣犳兂鍐欑殑瀛</u>
瀛椾綋鍒犻櫎綰: <s>鍐欎笂浣犳兂鍐欑殑瀛</s>
瀛椾綋鍔犲ぇ: <big>鍐欎笂浣犳兂鍐欑殑瀛</big>
瀛椾綋鎺у埗澶у皬錛<h1>鍐欎笂浣犳兂鍐欑殑瀛</h1> (鍏朵腑瀛椾綋澶у皬鍙浠巋1-h5,h1鏈澶э紝h5鏈灝)
鏇存敼瀛椾綋棰滆壊錛<font color="#value">鍐欎笂浣犳兂鍐欑殑瀛</font>(鍏朵腑value鍊煎湪000000涓巉fffff(16浣嶈繘鍒)涔嬮棿
娑堥櫎榪炴帴鐨勪笅鍒掔嚎錛<a href="鐩稿叧鍦板潃" style="text-decoration:none">鍐欎笂浣犳兂鍐欑殑瀛</a>
璐撮煶涔愶細<embed src="闊充箰鍦板潃" width="瀹藉害" height="楂樺害" autostart=false>
璐磃lash: <embed src="flash鍦板潃" width="瀹藉害" height="楂樺害">
璐村獎瑙嗘枃浠訛細<img dynsrc="鏂囦歡鍦板潃" width="瀹藉害" height="楂樺害" start=mouseover>
鎹㈣岋細<br>
孌佃惤錛<p>孌佃惤</p>
鍘熷嬫枃瀛楁牱寮忥細<pre>姝f枃</pre>
鎹㈠笘瀛愯儗鏅錛<body background="鑳屾櫙鍥劇墖鍦板潃">
鍥哄畾甯栧瓙鑳屾櫙涓嶉殢婊氬姩鏉℃粴鍔錛<body background="鑳屾櫙鍥劇墖鍦板潃" body bgproperties=fixed>
瀹氬埗甯栧瓙鑳屾櫙棰滆壊錛<body bgcolor="#value">(value鍊艱10)
甯栧瓙鑳屾櫙闊充箰錛<bgsound="鑳屾櫙闊充箰鍦板潃" loop=infinite>
璐寸綉欏碉細<iframe. src="鐩稿叧鍦板潃" width="瀹藉害" height="楂樺害"></iframe>

HTML甯哥敤浠g爜涔嬶細甯稿父浼氶亣鍒扮殑闂棰

鐐瑰嚮鍏抽棴紿楀彛
<a href="javascript.:top.window.close();">鐐瑰嚮鍏抽棴紿楀彛</a>錛
銆銆
璇烽棶濡備綍鍘繪帀涓婚〉鍙抽潰鐨勬粴鍔ㄦ潯錛
<body scroll="no">

<body style="overflow-y:hidden">
銆銆
濡備綍鍋氬埌璁╀竴涓緗戦〉鑷鍔ㄥ叧闂.
<html>

<head>
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
</head>
<body >
榪欎釜紿楀彛浼氬湪10縐掕繃鍚庤嚜鍔ㄥ叧闂,鑰屼笖涓嶄細鍑虹幇鎻愮ず. </body>

濡備綍鍦ㄤ笉鍒鋒柊欏甸潰鐨勬儏鍐典笅鍒鋒柊css?
<style>
button{ color:#000000;}
</style>
<button nclick=document.styleSheets[0].rules[0].style.color=鈥樷樷樷榬ed鈥樷樷樷>鐐瑰嚮鎸夐挳鐩存帴淇鏀箂tyle鏍囩鵑噷button閫夋嫨絎︿嬌鎸夐挳鏀逛負銆銆綰㈣壊</button>
銆銆
璇烽棶濡備綍璁╃綉欏佃嚜鍔ㄥ埛鏂幫紵
鍦╤ead閮ㄨ板叆<META. HTTP-EQUIV="Refresh" c>鍏朵腑20涓20縐掑悗鑷鍔ㄥ埛鏂幫紝浣犲彲浠ユ洿鏀逛負浠繪剰鍊箋
濡備綍璁╅〉闈㈣嚜鍔ㄥ埛鏂幫紵
鏂規硶涓錛岀敤refresh
HTML 浠g爜鐗囨靛備笅:
<head>
<meta. http-equiv="refresh" c>
</head>
5琛ㄧず鍒鋒柊鏃墮棿
[Ctrl+A 鍏ㄩ儴閫夋嫨 鎻愮ず:浣犲彲鍏堜慨鏀歸儴鍒嗕唬鐮侊紝鍐嶆寜榪愯宂
鏂規硶浜岋紝浣跨敤setTimeout鎺у埗
<img src=/logo.gif>
<script>
function rl(){
document.location.reload()
}
setTimeout(rl,2000)
</SCRIPT>
銆銆
濡備綍璁╄秴閾炬帴娌℃湁涓嬪垝綰
鍦ㄦ簮浠g爜涓鐨<HEAD>鈥</HEAD>涔嬮棿杈撳叆濡備笅浠g爜錛
<style. type="text/css"> <!--
a { text-decoration: none}
--> </style>
銆銆
璇烽棶濡備綍鍘繪帀IE鐨勪笂涓嬫粴鍔ㄦ潯錛
<body style=鈥樷樷樷榦verflow:scroll;overflow-y:hidden鈥樷樷樷>
</body>
銆銆
鎬庢牱鎵嶈兘鎶奟ealPlayer鏂囦歡鍦ㄧ綉欏靛仛涓涓璇曞惉榪炴帴錛
<embed height=25銆src=51js.rm type=audio/x-pn-realaudio-plugin width=50 autostart="false" c>
銆銆
濡備綍鐢╤tml瀹炵幇嫻忚堝櫒涓婂悗閫鎸夐挳鐨勫姛鑳斤紵
<a href="java script.:history.go(-1)">鐐瑰嚮鍚庨</a>
鎴栬
<script> history.back() </SCRIPT>

HTML甯哥敤浠g爜涔嬶細浣犱笉涓瀹氱煡閬撶殑鎶宸

ncontextmenu="window.event.returnValue=false" 灝嗗交搴曞睆钄介紶鏍囧彸閿
<table borderncontextmenu=return(false)><td>no</table> 鍙鐢ㄤ簬Table

<body nselectstart="return false"> 鍙栨秷閫夊彇銆侀槻姝㈠嶅埗

onpaste="return false" 涓嶅噯綺樿創

on="return false;" ncut="return false;" 闃叉㈠嶅埗

<link rel="Shortcut Icon"href="favicon.ico"> IE鍦板潃鏍忓墠鎹㈡垚鑷宸辯殑鍥炬爣

<link rel="Bookmark"href="favicon.ico"> 鍙浠ュ湪鏀惰棌澶逛腑鏄劇ず鍑轟綘鐨勫浘鏍

<inputstyle="ime-mode:disabled"> 鍏抽棴杈撳叆娉

姘歌繙閮戒細甯︾潃妗嗘灦
<script. language="JavaScript"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm涓烘嗘灦緗戦〉
// --></script>

闃叉㈣浜篺rame.
<SCRIPT. LANGUAGE=JAVASCRIPT><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>

緗戦〉灝嗕笉鑳借鍙﹀瓨涓
<noscript><iframe.src=*.html></iframe></noscript>

鏌ョ湅緗戦〉婧愪唬鐮
<input type=button value=鏌ョ湅緗戦〉婧愪唬鐮
onclick="window.location = "view-source:"+"http://www.w3cschool.cn"">

鍒犻櫎鏃剁『璁
<a href="javascript:if(confirm("紜瀹炶佸垹闄ゅ悧?"))location="boos.asp? &areyou=鍒犻櫎&page=1"">鍒犻櫎</a>

灞忚斀鍔熻兘閿甋hift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("紱佹㈡寜Shift閿!");//鍙浠ユ崲鎴怉LT銆CTRL
}
document.onkeydown=look;
</script>

緗戦〉涓嶄細琚緙撳瓨
<META. HTTP-EQUIV="pragma" CONTENT="no-cache">
<META. HTTP-EQUIV="Cache-Control"CONTENT="no-cache, must-revalidate">
<META. HTTP-EQUIV="expires"CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
鎴栬<META. HTTP-EQUIV="expires"CONTENT="0">

鎬庢牱璁╄〃鍗曟病鏈夊嚬鍑告劅錛
<input type=text style="border:1 solid #000000">
<input type=text style="border-left:none;border-right:none; border -top:none; border-bottom: 1 solid#000000"></textarea>

涓嶈佹粴鍔ㄦ潯?
璁╃珫鏉℃病鏈:
<body style="overflow:scroll;overflow-y:hidden">
</body>銆銆
璁╂í鏉℃病鏈:
<body style="overflow:scroll;overflow-x:hidden">
</body>
涓や釜閮藉幓鎺夛紵鏇寸畝鍗曚簡
<body scroll="no">
</body>

鎬庢牱鍘繪帀鍥劇墖閾炬帴鐐瑰嚮鍚庯紝鍥劇墖鍛ㄥ洿鐨勮櫄綰匡紵
<a href="#"nFocus="this.blur()"><img src="logo.jpg"border=0></a>

鐢靛瓙閭浠跺勭悊鎻愪氦琛ㄥ崟
<form. name="form1"method="post" action="mailt****@***.com"enctype="text/plain">
<input type=submit>
</form>

鍦ㄦ墦寮鐨勫瓙紿楀彛鍒鋒柊鐖剁獥鍙g殑浠g爜閲屽備綍鍐欙紵
window.opener.location.reload()

濡備綍璁懼畾鎵撳紑欏甸潰鐨勫ぇ灝
<body nload="top.resizeTo(300,200);">
鎵撳紑欏甸潰鐨勪綅緗<bodynload="top.moveBy(300,200);">

鍦ㄩ〉闈涓濡備綍鍔犲叆涓嶆槸婊¢摵鐨勮儗鏅鍥劇墖,鎷夊姩欏甸潰鏃惰儗鏅鍥句笉鍔
<STYLE>
body
{background-image:url(logo.gif); background-repeat:no-repeat;
background-position:center;background-attachment: fixed}
</STYLE>

媯鏌ヤ竴孌靛瓧絎︿覆鏄鍚﹀叏鐢辨暟瀛楃粍鎴
<script. language="Javascript"><!--
function checkNum(str){return str.match(//D/)==null}
alert(checkNum("1232142141"))
alert(checkNum("123214214a1"))
// --></script>

鑾峰緱涓涓紿楀彛鐨勫ぇ灝
document.body.clientWidth; document.body.clientHeight

鎬庝箞鍒ゆ柇鏄鍚︽槸瀛楃
if (/[^/x00-/xff]/g.test(s)) alert("鍚鏈夋眽瀛");
else alert("鍏ㄦ槸瀛楃");

TEXTAREA鑷閫傚簲鏂囧瓧琛屾暟鐨勫氬皯
<textarea rows=1 name=s1 cols=27npropertychange="this.style.posHeight=this.scrollHeight">
</textarea>

鏃ユ湡鍑忓幓澶╂暟絳変簬絎浜屼釜鏃ユ湡
<script. language=Javascript>
function cc(dd,dadd)
{
//鍙浠ュ姞涓婇敊璇澶勭悊
var a = new Date(dd)
a = a.valueOf()
a = a - dadd * 24 * 60 * 60 * 1000
a = new Date(a)
alert(a.getFullYear() + "騫" + (a.getMonth() +1) + "鏈" + a.getDate() + "鏃")
} cc("12/23/2002",2)
</script>

閫夋嫨浜嗗摢涓涓猂adio
<HTML><script. language="vbscript">
function checkme()
for each ob in radio1
if ob.checked then window.alert ob.value
next
end function
</script><BODY>
<INPUT name="radio1" type="radio"value="style" checked>Style.
<INPUT name="radio1" type="radio"value="barcode">Barcode
<INPUT type="button" value="check"nclick="checkme()">
</BODY></HTML>

鑴氭湰姘鎬笉鍑洪敊
<SCRIPT. LANGUAGE="JavaScript">
<!-- Hide function killErrors(){return true;} window.onerror = killErrors;// -->
</SCRIPT>

ENTER閿鍙浠ヨ╁厜鏍囩Щ鍒頒笅涓涓杈撳叆妗
<input nkeydown="if(event.keyCode==13)event.keyCode=9">