Usually we write ASP, usually use VBScript or JavaScript.
JavaScript is used to implement classes with function, and it is very troublesome, and the effect is uncomfortable. Although VBScript can implement classes, it also has great limitations.
If you use Python to write the ASP script, you can achieve a true class, becoming a real facing image. Please see the example below:
<% @ Language = "python" codepage = "936"%>
<%
Import sys
Import Urllib
Class URTT:
DEF __INIT __ (Self):
Self.Text1 = 'TestPython'
DEF URT (Self):
Fr = urllib.urlopen ('http://www.163.com ")
For fl in fr.readlines ():
Response.write (Server.htmlencode (FL))
fr.close ()
Response.write (Self.Text1)
Class Urtta (Urtt):
DEF __INIT __ (Self, URL):
Self.strurl = URL
Self.Text1 = 'TextPython'
DEF URTS (Self):
Fr = urllib.urlopen (Self.strurl)
For fl in fr.readlines ():
Response.write (Server.htmlencode (FL))
fr.close ()
Response.write (Self.Text1)
UTTA = urtt ()
Utta.urt ()
Utt = urtta ("http://sohu.com")
Utt.urts ()
%>