How to add a Javascript on the server-side control (TextBox)

xiaoxiao2021-03-05  50

E.g:

Built a server-side TextBox control, I have to put the focus now.

Front desk:

At this time, you need to see if the ID value in the source file is compiled into what code is compiled, for example, may be compiled into member_keyword.

Then our background is to add an event to the control.

Keyword.attributes.add ("Onclick", "Form1.member_keyword.focus ();")

Cause of:

This variable value is not loaded due to the generating HTML, so the event cannot be found.

From:

http://community.9cbs.net/expert/topic/3974/3974814.xml?temp=5.675906e-02

Master: Access page control in Response.Write? Servers: Flybird_LX (Flybird) Almight: Credit: 100 Community: .NET Technology ASP.NET Questions: 100 Reposted: 8 Posted: 2005-4-28 23:41:34

Response.write ("