标签 JS 下的文章

CSS, JS - version

<link 
    rel="stylesheet" 
    href="../resources/css/style.css?version=<?php echo filemtime('../resources/js/login.php.js');?>">
<script 
    type="text/javascript" 
    src="../resources/js/login.php.js?version=<?php echo filemtime('../resources/js/login.php.js)';?>">
</script>

阅读全文

PHP - JS - JSON

php array 轉 json

$json = json_encode($array);

js json 轉 string

var json;
var str = JSON.stringify(json);

JS - 转义

<script>
var func = "<a href='?uuid=&quot;" + <?php echo $uuid;?> + "&quot;' onclick='if(confirm(&quot;确认要删除吗?&quot;)) return true;else return false;'>删除</a>";
</script>