---
title: "一个服务器端的button既能执行js又能执行后台代码"
author: "starnc"
date: "2009-03-11T10:20:00Z"
tags: []
slug: "button-js"
draft: false
lastmod: "2009-04-03T08:54:40Z"
id: 360410
url: "https://starnc.iteye.com/blog/360410"
---

执行js 的onclick事件

在page\_load事件里添加ibtnSend.Attributes.Add("onclick", "return CheckThisForm();");

执行后台的onclick事件

双击button进入后台直接写