JavascriptʵÏÖGridViewÎÞË¢ÐÂÑ¡ÔñÒ»ÐÐ
ÓÃJavascript¿ÉÒÔʵÏÖ¶ÔGridViewÖÐijһÐÐÑ¡Ôñ£¬¶øÎÞÐè½øÐÐÒ³ÃæµÄˢС£
Ê×ÏÈÒªÔÚGridViewµÄonrowdataboundµÄevent handlerÖÐΪGridViewÖеÄÿһÐÐonclick°ó¶¨event handler (Javascript)¡£¼ÙÈçGridView´úÂëÈçÏ£º
<asp:GridView runat="server" id="GridViewCategory" AutoGenerateColumns="False"
Width="100%" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid"
BorderWidth="3px" CellPadding="4" CellSpacing="2"
ForeColor="Black" onrowdatabound="GridViewCategory_RowDataBound">
<RowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="Description" HeaderText="Category" />
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
</asp:GridView>
onrowdataboundµÄevent handler´úÂëÈçÏ£º
protected void GridViewCategory_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
&nbs
Ïà¹ØÎĵµ£º
Js´úÂë
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="wmp" >
<param name="URL" value="" /> ......
http://www.cnblogs.com/sanshi/archive/2009/07/08/1519036.html
Ò»¡¢sanshi javascript ¼Ì³ÐϵÁУº
1¡¢ JavaScript¼Ì³ÐÏê½â£¨Ò»£© http://www.cnblogs.com/sanshi/archive/2009/07/08/1519036.html
2¡¢JavaScript¼Ì³ÐÏê½â£¨¶þ£©
3¡¢ JavaScript¼Ì³ÐÏê½â£¨Èý£©
4¡¢JavaScript¼Ì³ÐÏê½â£ ......
°æ±¾£ºDHTML Object Model¡¡·µ»ØÖµ£ºÓÐ
Óï·¨£º
oTextRange = object . createTextRange ()
²ÎÊý£º
ÎÞ
·µ»ØÖµ£º
oTextRange : ¶ÔÏó(Element)¡£Èç¹û³É¹¦µÄ»°·µ»Ø±»½¨Á¢µÄ TextRange ¶ÔÏó¡£
˵Ã÷£º
Ϊ object ½¨Á¢ TextRange ¶ÔÏó¡£
ʹÓÃ´Ë TextRange ¶ÔÏó¿ÉÒÔ¼ìË÷ºÍÐÞ¸Ä object ÄÚµÄÎı¾¡£ TextRange ¶ÔÏ ......
Ç°Ì¨Ò³ÃæÎª ×ÓÒ³ÃæÎªÒ»¸ö°´Å¥£º
<form id="form1" runat="server">
<div>
<asp:Button runat="server" ID="Bt_Add" Text="Ìí¼Ó" Width="80px" Height="20px" OnClick="Bt_Add_Click" />
</div>
  ......