- Code: Select all Expand view
- <html>
<script>
function init()
{
alert( "init" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas management</h1>
</body>
</html>
<html>
<script>
function init()
{
alert( "init" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas management</h1>
</body>
</html>
<html>
<script>
function init()
{
alert( "init" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas management</h1>
<canvas id="canvas" width="800" height="500" style="background-color:#000"></canvas>
</body>
</html>
<html>
<script>
var ctx; // context
function init()
{
var canvas = document.getElementById( 'canvas' );
ctx = canvas.getContext( '2d' );
alert( "init" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas management</h1>
<canvas id="canvas" width="800" height="500" style="background-color:#000"></canvas>
</body>
</html>
<html>
<script>
var ctx; // context
var row, col; // say coordinates
function Say( cText )
{
ctx.fillText( cText, col, row );
row += 20;
}
function init()
{
var canvas = document.getElementById( 'canvas' );
ctx = canvas.getContext( '2d' );
ctx.fillStyle = '#0f0';
ctx.font = '20px verdana';
ctx.textBaseline = 'top';
row = 0;
col = 0;
Say( "Initializing..." );
Say( "ready" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas management</h1>
<canvas id="canvas" width="800" height="500" style="background-color:#000"></canvas>
</body>
</html>
<html>
<script>
var ctx; // context
var row, col; // say coordinates
function Say( cText )
{
ctx.fillText( cText, col, row );
row += 22;
}
function init()
{
var canvas = document.getElementById( 'canvas' );
ctx = canvas.getContext( '2d' );
ctx.fillStyle = '#0f0';
ctx.font = '20px verdana';
ctx.textBaseline = 'top';
row = 0;
col = 0;
Say( "Initializing..." );
Say( new Date() );
Say( "ready" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas management</h1>
<canvas id="canvas" width="800" height="500" style="background-color:#000"></canvas>
</body>
</html>
<html>
<script>
var ctx; // context
var row, col; // say coordinates
function Say( cText )
{
ctx.fillText( cText, col, row );
row += 22;
}
function init()
{
var canvas = document.getElementById( 'canvas' );
ctx = canvas.getContext( '2d' );
ctx.fillStyle = '#0f0';
ctx.font = '20px verdana';
ctx.textBaseline = 'top';
row = 0;
col = 0;
Say( "Initializing..." );
Say( new Date() );
Say( "ready" );
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas console implementation</h1>
<div style="width: 820px; height: 500px; overflow: auto;">
<canvas id="canvas" width="800" height="570" style="background-color:#000"></canvas>
</div>
<br>
Command: <input type="text" name="command" style="width:750px; background-color:#000; color:#0f0; font-size: 20px;">
</body>
</html>
<html>
<script>
var ctx; // context
var row, col; // say coordinates
function Say( cText )
{
ctx.fillText( cText, col, row );
row += 22;
}
function init()
{
var canvas = document.getElementById( 'canvas' );
ctx = canvas.getContext( '2d' );
ctx.fillStyle = '#0f0';
ctx.font = '20px verdana';
ctx.textBaseline = 'top';
row = 0;
col = 0;
Say( "Initializing..." );
Say( new Date() );
Say( "ready" );
}
function ProcessCommand( event )
{
if( event.keyCode == 13 )
{
var edit = document.getElementById( "command" );
Say( edit.value );
edit.value = "";
}
}
window.onload = init;
</script>
<head>
</head>
<body>
<h1>HTML5 canvas console implementation</h1>
<div style="width: 820px; height: 500px; overflow: auto;">
<canvas id="canvas" width="800" height="570" style="background-color:#000"></canvas>
</div>
<br>
<b>Command:</b> <input id="command" type="text" name="command" style="width:750px;
background-color:#000; color:#0f0; font-size: 20px;"
onkeypress="ProcessCommand( event )">
</body>
</html>
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 42 guests