Copy Code code as follows:
<script language= "javascript" type= "Text/javascript" >
function Countnum ()
{
var Count=document.getelementbyid ("Txttext"). Value.length;
document.getElementById ("Lblcount"). Value=count;
}
</script>
Copy Code code as follows:
<asp:textbox id= "Txttext" name= "Txttext" runat= "Server" columns= "no" rows= "8" textmode= "MultiLine"
Width= "650px" height= "150px" onkeydown= "Countnum ();"
Onmousemove= "Countnum ();" onmouseout= "countnum ();" onkeyup= "countnum ();" ></asp:TextBox>
(Entered <input id= "lblcount" type= button "style=" Border-style:none; Background:none; "value=" 0 "/> Word)
| Mouse events, keyboard events |
| Event |
Describe |
| OnClick |
Mouse click events, more than the control of an object in the range of mouse clicks |
| OnDblClick |
Mouse Double-click event |
| OnMouseDown |
The button on the mouse was pressed |
| OnMouseUp |
Events fired when the mouse is pressed and released |
| OnMouseOver |
Event that is triggered when the mouse moves over a range of objects |
| OnMouseMove |
Events that are triggered when the mouse is moved |
| onmouseout |
Event triggered when the mouse leaves a range of objects |
| OnKeyPress |
The event that is triggered when a key on the keyboard is pressed and released.
[Note: There must be focused objects on the page] |
| OnKeyDown |
Event that is triggered when a key on the keyboard is pressed [Note: There must be a focused object on the page] |
| OnKeyUp |
An event that is triggered when a key on the keyboard is pressed to open [note: There must be a focused object on the page] |