我想隐藏CSS源代码并按照本教程进行操作,但是不起作用,请问有什么专业人士可以帮助我检查此错误吗?谢谢。 代码如下: Javascript:
$(window).load(function(){//Function call On Load windows
$.post("Ajax.php?action=getCss",{},function(data){//Ajax Request To Css
$("#Corecss").html(data);// Paste css in Corecss Div without Shoing
});
});//Thanks Hashaam zahid From Pakistan
HTML:
<div id="Corecss"></div>
ajax.php文件:
if($_GET['action']=='getCss')
{
$sDbServerName="localhost";$sDbUserName="***";$sDbPassword="*****";$sDbName="Data";// Connection with database server $dbConnect=mysql_connect($sDbServerName,$sDbUserName,$sDbPassword);if($dbConnect)
{
echo '<link rel="stylesheet" href="css/creative.css" type="text/css">';
}
else
{
die("You Cannot Do it With Css");
}
}//Thanks From Hahshaam zahid ( ittuc.com ) and facebook/HashaamKhan321