我需要在我的 php 文件中包含一些 javascript,但我在使用 javascript 中的引号时遇到了困难
这是javascript:
<scripttype="text/javascript">
var sc_project = $$$$;
var sc_invisible = $;
var sc_security = "$$$$$$$";
var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "http://www.")
document.write("<sc" + "ript type='text/javascript' src='" + scJsHost + "statcounter.com/counter/counter.js'></" + "script>");
</script>
我试过了
echo {
'<scripttype="text/javascript">
var sc_project = $$$$$$;
var sc_invisible = $;
var sc_security = "$$$$$$";
var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "http://www.")
document.write("<sc" + "ript' . 'type=\'text/javascript\' src='' . ' + scJsHost + "statcounter.com/counter/counter.js'.'></" + "script>");
</script>';
}
有什么办法可以让这个出现在我的 php 页面上?