HTML Button

asp.net html 控件


<script  runat="server">
sub button1(source as object, e as eventargs)
   p1.innerhtml="you clicked the blue button!"
end sub
sub button2(source as object, e as eventargs)
   p1.innerhtml="you clicked the pink button!"
end sub
</script>


<!doctype html>
<html>
<body>

<form runat="server">
<button id="b1" onserverclick="button1"
style="background-color:#e6e6fa;
height:25;width:100" runat="server">
blue button!
</button>
<button id="b2" 
onserverclick="button2" 
style="background-color:#fff0f5;
height:25;width:100" runat="server">
pink button!
</button>
<p id="p1" runat="server" />
</form>

</body>
</html>
相关文章