开发者

JavaScript doesn't work in my PHP code

i have this in my index.php

include 'app/Core.php';     
echo Core::getPageHtml();  

in Core.php

final cla开发者_开发知识库ss Core
{
    public static function getPageHtml()
{
    ob_start();
    include 'layout.php';
    $html = ob_get_clean();
    return $html;
}
}  

layout.php is normal html code, i can see de page, just perfect, but the javascript code doesn't work, i even write an alert('hello world'), like this

   <script type="text/javscript">
     alert('hello world');
   </script>  

so, it should be simple, but i can make it work, what am i missing here? need some help with this code


"text/javscript" -> "text/javascript"


Works for me, you had text/javascript spelled wrong though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜