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
Ïà¹ØÎĵµ£º
±¾ÎÄת×Ô£ºhttp://bbs.51js.com/viewthread.php?tid=85083&extra=page%3D1
ÔÚ×Ô¶¨ÒåµÄº¯ÊýÖУ¬Èç¹ûÒªÏòº¯ÖÐÌύһЩ²ÎÊý£¬Ï°¹ßÐԵشó¼Ò»áÔÚº¯ÊýÖж¨Òå
Àý£º<script>
function test(a,b){
alert(a);
alert(b);
}
test("µÚÒ»´Î" ......
°æ±¾£ºDHTML Object Model¡¡·µ»ØÖµ£ºÓÐ
Óï·¨£º
oTextRange = object . createTextRange ()
²ÎÊý£º
ÎÞ
·µ»ØÖµ£º
oTextRange : ¶ÔÏó(Element)¡£Èç¹û³É¹¦µÄ»°·µ»Ø±»½¨Á¢µÄ TextRange ¶ÔÏó¡£
˵Ã÷£º
Ϊ object ½¨Á¢ TextRange ¶ÔÏó¡£
ʹÓÃ´Ë TextRange ¶ÔÏó¿ÉÒÔ¼ìË÷ºÍÐÞ¸Ä object ÄÚµÄÎı¾¡£ TextRange ¶ÔÏ ......
// ÏÂÀÁбíÀà
// PubEdition: Version 1.0.0.0
// ModifyDate: 2009-12-09 9:30:00
// FinishDate: 2009-12-09 9:30:00
// AuthorName: binbin( Mail:pl45@163.com / Tel:13893302154 )
var droplistswap=function(){};
droplistswap.prototype.originalElement=new Array();
// droplistswap.prototype.hidedropl ......
Ç°Ì¨Ò³ÃæÎª ×ÓÒ³ÃæÎªÒ»¸ö°´Å¥£º
<form id="form1" runat="server">
<div>
<asp:Button runat="server" ID="Bt_Add" Text="Ìí¼Ó" Width="80px" Height="20px" OnClick="Bt_Add_Click" />
</div>
  ......
×î½üÔÚѧϰjavascript,¶ÔÓÚÈçºÎÔËÐе÷ÊÔÈ´²»Á˽⡣ÒÔΪÔÚ¼Çʱ¾Öб༺ÃÎļþºó±£´æÎªhtmÎļþ£¬È»ºóÔÚä¯ÀÀÆ÷Öдò¿ª¾Í¿ÉÒÔÁË£¬µ«ÎÒÊÔÁ˶à´Î¶¼²»³É¹¦£¬ºóÀ´ÖÕÓÚ·¢ÏÖÔÀ´ÎÒÔÚ¼Çʱ¾Öб༱£´æµÄÎļþµÄºó׺ÃûΪ“.txt”¡£
½â¾ö·½·¨£º“Îļþ¼ÐÑ¡Ïî&rdqu ......