<script language="javascript">
function func()
{
}
</script>Attributes.Add( "onClick", "fun();" );
function func()
{
}
</script>Attributes.Add( "onClick", "fun();" );
解决方案 »
- checkboxlist js判断是否选中
- Attempted to read or write protected memory
- C#调用WORD修改文档.请问需要哪个OFFICE组件?
- 请问这个语句应该怎么写?
- 关于线程????
- 在三层结构中,这样插入,修改数据,有必要这样做吗?看了几个人写的三层都是这样。困惑中。。。
- 有关iis 的问题
- 求助一个简单问题!!
- 本机测试通过,网站?
- 最初级的问题:Visual Studio中类如htmlAnchor这样的html控件只能手动输入吗?
- 怎么同时得到存储过程的输出参数值和返回值?
- 求一个好的用存储过程分页的datagrid列子(vb.net)?(解决后给分)
private void DataGrid1_ItemCreated(object sender, DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item
|| e.Item.ItemType == ListItemType.EditItem
|| e.Item.ItemType == ListItemType.AlternatingItem)
{
//button
Button btn = (Button)e.Item.FindControl("btnDel");
btn.Attributes.Add("onclick","return confirm('are you sure to delete " + e.Item.ItemIndex.ToString() + "');");
//linkbutton
LinkButton lbtn = (LinkButton)e.Item.FindControl("lbtnDel");
lbtn.Attributes.Add("onclick","return confirm('are you sure to delete " + e.Item.ItemIndex.ToString() + "');"); //imagebutton
ImageButton iBtn = (ImageButton)e.Item.FindControl("btnImage");
iBtn.Attributes.Add("onclick","return confirm('are you sure to delete " + e.Item.ItemIndex.ToString() + "');");
}
}