A
Ali
I have the following webpage with a javasctript in it:
<html>
<head>
<title>Custom Objects Test</title>
<script language="javascript">
function PrintCard() {
line1 = "<hr>\n";
line2 = "<b>Name: </b>" + this.name + "<br>\n";
line3 = "<b>Email: </b>" + this.email + "<br>\n";
document.write(line1, line2, line3);
}
function Card(name,email) {
this.name = name;
this.email = email;
this.PrintCard = PrintCard;
}
</script>
</head>
<body>
<script language="javascript">
ali = new Card("Ali", "(e-mail address removed)");
zainab = new Card("Zainab", "(e-mail address removed)");
ali.PrintCard();
zainab.PrintCard();
</script>
</body>
</html>
The script in this page, has a function (Card) that is used to create
an object with its own properties and methods (ali and zainab in this
script). I was wondering if this was possible in python.
If you have questions plz dont hesitate to ask. Please Help. Thank you
<html>
<head>
<title>Custom Objects Test</title>
<script language="javascript">
function PrintCard() {
line1 = "<hr>\n";
line2 = "<b>Name: </b>" + this.name + "<br>\n";
line3 = "<b>Email: </b>" + this.email + "<br>\n";
document.write(line1, line2, line3);
}
function Card(name,email) {
this.name = name;
this.email = email;
this.PrintCard = PrintCard;
}
</script>
</head>
<body>
<script language="javascript">
ali = new Card("Ali", "(e-mail address removed)");
zainab = new Card("Zainab", "(e-mail address removed)");
ali.PrintCard();
zainab.PrintCard();
</script>
</body>
</html>
The script in this page, has a function (Card) that is used to create
an object with its own properties and methods (ali and zainab in this
script). I was wondering if this was possible in python.
If you have questions plz dont hesitate to ask. Please Help. Thank you