亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

javascript 在網(wǎng)頁(yè)中的運(yùn)用(asp.net)

 更新時(shí)間:2009年11月23日 00:09:20   作者:  
javascript在網(wǎng)頁(yè)中的運(yùn)用實(shí)現(xiàn),需要的朋友可以參考下。

復(fù)制代碼 代碼如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
#mydiv
{
height: 89px;
}
</style>
<script runat="server"> //服務(wù)器端腳本語(yǔ)言 ④
protected void Page_Load(object sender, EventArgs e)
{
Button1.Attributes.Add("onclick", "javascript:return confirm('真的準(zhǔn)備刪除嗎?')"); //單擊button1時(shí) 彈出對(duì)話框
}
protected void Button1_Click2(object sender, EventArgs e)
{
Response.Write("執(zhí)行刪除任務(wù)嗎??!"); //單擊同意是 執(zhí)行 否則不執(zhí)行
}
</script>
<script language="javascript" type="text/javascript"> //瀏覽器端腳本 ②
function tupian_onclick(tupian) //服務(wù)器端需傳參數(shù)
{
tupian.src="banner_right_02.gif"
}
function tupian_onmouseover(tupian) {
tupian.src="banner_right_02.gif";
}
function tupian_onmouseout(tupian) {
tupian.src="banner_right_01.gif";
}
</script>
</head>
<body onload ="test()"> //加載腳本文件中的函數(shù)
<script language ="javascript"> ①
document.write("<font color=blue>你好,Javascript!</font>");
</script> // 在網(wǎng)頁(yè)上顯示字符串
<form id="form1" runat="server"> //表單
<div>
<img id="tupian" alt="" src="banner_right_01.gif" //圖片
onclick="return tupian_onclick(tupian)" onmouseover="return tupian_onmouseover(tupian)" onmouseout="return tupian_onmouseout(tupian) /> --服務(wù)器javascript腳本函數(shù)調(diào)用需加參數(shù)
<div id="mydiv" onclick="return mydiv_onclick()"></div> 定義一個(gè)ID為mydiv
<script src ="test.js"> //調(diào)用腳本文件 ③
</script>
<asp:Button ID="Button1" runat="server" Text="彈出確定框" onclick="Button1_Click2" />
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/banner_right_01.gif" onclick="ImageButton1_Click" onmouseover="this.src='banner_right_02.gif'" onmouseout="this.src='banner_right_01.gif'" />
//一班情況下服務(wù)器端不響應(yīng)鼠標(biāo)移動(dòng)事件 通過(guò)此方法可在客戶端響應(yīng)鼠標(biāo)移動(dòng)時(shí)間
</div>
</form>
</body>
</html>

相關(guān)文章

最新評(píng)論