JavascriptʵÏÖ×Ó´°¿ÚÏò¸¸´°¿Ú´«Öµ(ת)
page1.htmlΪ¸¸´°¿Ú£¬page2.htmΪ×Ó´°¿Ú¡£Ïêϸ´úÂëÈçÏ£º
page1.html
ÒýÓÃ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>×Ó´°¿Ú´«Öµ¸ø¸¸´°¿Ú</title>
<script language="JavaScript" type="text/javascript">
function openWin(u, w, h) {
var l = (screen.width - w) / 2;
var t = (screen.height - h) / 2;
var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l;
s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no';
open(u, 'oWin', s);
}
function openIt(){
window.open("page2.html",400,300);
}
</script>
</head>
<body>
<input type="text" id="text1" />
<input type="button" value="µ¯³ö" onclick="openIt()" />
</body>
Ïà¹ØÎĵµ£º
JavascriptʵÀý£ºSelectµÄOnChange()ʼþ
ÎÒÃÇÓÃSelectµÄonchangeʼþʱ,³£»áÓöµ½ÕâÑùÒ»¸öÎÊÌâ,ÄǾÍÊÇÁ¬ÐøÑ¡ÏàͬһÏîʱ,²»´¥·¢onchangeʼþ.ÄãµÃÓÐChange(¸Ä±ä),²ÅÄÜ´¥·¢¸Ãʼþ
<select name=sel onchange="bao(this.options[this.options.selectedIndex].value)">
<option va ......
×î½üÕâ¶Îʱ¼äÒ»Ö±ÔÚ¸ãǰ¶ËJavaScript£¬ÒÔǰ×ܾõµÃJSûʲô¸ãÍ·£¬¾¹ýÕâÒ»¶ÎµÄÓ¦Ó㬲ŷ¢ÏÖJsÀïÃæµÄ¶«Î÷ÕæµÄºÜÉîºÜÉîµÄ£¬²»È»ÎªÊ²Ã´¸÷´óÃÅ»§ÍøÕ¾¶¼ÕÐÒ»ÅúJS¹¤³ÌÊ¦ÄØ¡£
ÒÔÏÂÎÄÕÂΪÒýÓÃÀîÕ½ÀϸçµÄ¡¶Îò͸JavaScript¡·Ò»ÎÄ£¬Ð´µÄʵÔÚÌ«ºÃÁË£¬¾ÍÊÕ¼ÁË£¬ÒÔ×ö¸ö±¸Óá£
Òý×Ó
& ......
<html>
<head>
<title>changePage</title>
</head>
<body>
<table id="pic" cellpadding="0" cellspacing="0" border="1" width="200" height="100" bordercolor="red">
<tr>
<td>picture chanage!</td>
</tr>
</table>
< ......
ÏñÉÏÃæµÄÒ»ÕÅͼƬÎÒÃǸÃÔõôÓÃjs ºÍcss + div ºÜºÃµÄÓ¦Óõ½ÎÒÃǵÄÏîÄ¿ÖÐÄØ£¿
<style>
.InpuRight{
height:20px;background:url(img/msg_bg.png) no-repeat;background-position:0px -250px;
}
.InputError{
width:20px;height:20px;background:url(img/msg_bg.png) no-repeat 0px 0px;
}
.inputLogin{
wid ......
JavaScript »ñȡʼþ¶ÔÏóµÄÒ»¸ö×¢Òâµã
2009-7-24 ÉÏÎç
- JS/Ajax/AS/Flex
- event
- javascript
ƽʱÎÒÃÇ»ñȡʼþ¶ÔÏóÒ»°ãд·¨ÈçÏ£º
function
getEvent
(
event
)
{
return
event
||
window
.
event
// IE:window.event
}
Èç¹ûûÓвÎÊý£¬Ò²¿ ......