首页 开发者工具 DHTMLConsole

DHTMLConsole

用户数 : 128 分类 : 开发者工具 扩展大小 : 356KiB 最后更新时间 : 2016-01-19 版本 : 0.4
                            This plugin allows you to send a message from your web server (directly by running a server script or making an ajax call) to your browser by using an HTTP Header.

The only rule is that you need to send custom HTTP headers from your server with the name of the header starting with X-DHTML-CONSOLE.

To send a message from a PHP script to the browser, this implementation will suffice:

<?php
header('X-DHTML-CONSOLE-MSG: Hello World');
?>

As of version 0.3, you can now do javaScript alerts
<?php
header('X-DHTML-CONSOLE-MSG: alert:Hello World');
?>


As of version 0.3, you can clear the console from server by:
<?php
header('X-DHTML-CONSOLE-MSG: -clear-');
?>


To send multiple messages in PHP:

<?php
function dhtmlconsole($msg='') {
    static $pos=0;
    $pos++;
   header('X-DHTML-CONSOLE-MSG'.$pos.': '.$msg);
}

//implementation
dhtmlconsole("Hello");
dhtmlconsole("World");
?>

                        
查看更多
下载 如何离线安装? Chrome store

分享

全部评论

    展开更多评论

    错误提示保存失败
    成功提示保存成功
    close
    qr-code

    为打击盗链困扰,本站已启用公众号验证
    微信扫码关注上方公众号,回复“插件”二字获得验证码,验证码5分钟内全站有效。

    正在验证
    验证成功
    下载遇到问题?请添加QQ群:398095333
    close
    qr-code

    为打击盗链困扰,本站已启用公众号验证
    微信扫码关注上方公众号,回复“脚本”二字获得验证码,验证码5分钟内全站有效。

    正在验证
    验证成功