mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-07 18:07:49 +02:00
29 lines
654 B
HTML
29 lines
654 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Demo - descend Pascal class from JS function</title>
|
|
<script type="text/javascript">
|
|
|
|
function Person(first, last, age) {
|
|
console.log('Person first='+first+' last='+last+' age='+age);
|
|
this.first = first;
|
|
this.last = last;
|
|
this.age = age;
|
|
this.run = function(value){
|
|
console.log('Person.run value='+value);
|
|
};
|
|
}
|
|
|
|
</script>
|
|
<script src="ExtendJSFunctionClass1.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
rtl.run();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|