DropDownListµ÷ÓÃjavascript¿ØÖƱí¸ñÐÐtrµÄÏÔʾÓëÒþ²Ø
DropDownListµ÷ÓÃjavascript¿ØÖƱí¸ñÐÐtrµÄÏÔʾÓëÒþ²Ø
<mce:script language="javascript"><!--
function cao() {
if(document.all.ddl_class.value=="0")
{
hongtou.style.display="none";
wailai.style.display="none";
wailai1.style.display="none";
}
else if(document.all.ddl_class.value=="1")
{
hongtou.style.display="block";
wailai.style.display="none";
wailai1.style.display="none";
}
else
{
hongtou.style.display="none";
wailai.style.display="block";
wailai1.style.display="block";
}
}
// --></mce:script>
<asp:DropDownList ID="ddl_class" runat="server" onchange="cao()">
<asp:ListItem Value="0">н¨Îļþ</asp:ListItem>
<asp:ListItem Value="1">ºìÍ·Îļþ</asp:ListItem>
<asp:ListItem Value="2">ÍâÀ´Îļþ</asp:ListItem>
</asp:DropDownList>
<table>
<tr id="hongtou" style="DISPLAY:none" mce_style="DISPLAY:none">
<td>·ÝÊý:</td>
<td></td>
</tr>
<tr id="wailai" style="DISPLAY:none" mce_style="DISPLAY:none">
<td>À´ÎÄ£¨µç£©µ¥Î»:</td>
<td></td>
</tr>
<tr id="wailai1" style="DISPLAY:none" mce_style="DISPLAY:none">
<td>ÁªÏµÈË:</td>
<td></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
}
Èç¹ûûÓвÎÊý£¬Ò²¿ ......
Ö±½ÓÉÏÀý×Ó£º
<html>
<script language = "javascript">
var msg = "È«¾Ö±äÁ¿";
function show(){
msg = "¾Ö²¿±äÁ¿";
}
show();
alert(msg);
</script&g ......
<script language="javascript" type="text/javascript">
function arrayTest() {
//ʹÓÃnew Array()
var array1 = ......