protected
void
Button1_Click(
object
sender, EventArgs e)
{
// 当弹出confirm框的时候是否往下继续
Response.Write( string .Format( " <script>if(confirm('continue or not!')){{{0}}}else{{{1}}}</script> " , WriteStr(),Cancel()));
}
private static string WriteStr()
{
return " alert('ok') " ;
}
private static string Cancel()
{
return " alert('canceled') " ;
}
// 根据前台反馈后台处理结果
{
// 当弹出confirm框的时候是否往下继续
Response.Write( string .Format( " <script>if(confirm('continue or not!')){{{0}}}else{{{1}}}</script> " , WriteStr(),Cancel()));
}
private static string WriteStr()
{
return " alert('ok') " ;
}
private static string Cancel()
{
return " alert('canceled') " ;
}
// 根据前台反馈后台处理结果
根据前台反馈后台处理结果