mirror of
https://github.com/bdnugget/php-wasm.git
synced 2026-11-07 09:07:28 +00:00
21 lines
447 B
PHP
21 lines
447 B
PHP
<?php // {"autorun":true, "persist":false, "single-expression": false, "render-as": "text"}
|
|
|
|
$oldTitle = NULL;
|
|
$newTitle = 'Changed@' . date('h:i:s');
|
|
|
|
// Grab the current title
|
|
$oldTitle = vrzno_eval('document.title');
|
|
|
|
// Change the document title
|
|
$newTitle = vrzno_eval('document.title = "' . $newTitle . '"' );
|
|
|
|
printf(
|
|
'Title changed from "%s" to "%s".'
|
|
, $oldTitle
|
|
, $newTitle
|
|
);
|
|
|
|
|
|
// Show an alert
|
|
vrzno_run('alert', ['Hello, World!']);
|