<script>
var url=document.location.href;
var str1 = url.replace('www.17179.top', 'blog.172u.cn');
document.getElementById("blogUrl").setAttribute("href",str1);
</script> <a id="blogUrl" >图站</a> <script>
var url=document.location.href;
var str1 = url.replace('www.17179.top', 'blog.172u.cn');
document.getElementById("blogUrl").setAttribute("href",str1);
</script> <a id="blogUrl" >图站</a> 有些网站通过 CSS 的 user-select: none、禁用右键、监听 copy 事件等方式限制文本选中和复制。这类限制都发生在浏览器端,用开发者工具可以直接读到页面里的原始文本。
原理
页面上显示的每一个字,本质上都是 DOM 节点里的文本内容。CSS 只能阻止用户用鼠标选中,无法阻止程序读取 innerText 或 textContent。所以在控制台里取出节点文本,就能绕过选中限制。
操作步骤
$('#content').text()没有 id 就用 class 选择器:
$('.article-body').text()如果没有 jQuery
并不是所有页面都加载了 jQuery,$ 会报未定义。这时用原生 API:
document.querySelector('.article-body').innerText取整页文本可以更简单:
document.body.innerText关于原文里的百度文库例子
$('div.ie-fix').text() 针对的是文库页面当年某个特定的容器 class。这类页面的 DOM 结构随改版频繁变化,class 名一改,旧选择器就失效了。遇到取不到内容的情况,不要死磕旧选择器,按上面第 2 步重新定位当前节点即可。
注意事项
将单个php空间绑定多个域名
我们可利用.htaccess伪静态(URL重写)绑定域名到子目录实现子站点。
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.17179.top$ [NC]
RewriteCond %{REQUEST_URI} !^/www17179top/
RewriteRule ^(.*)$ www17179top/$1?Rewrite [L,QSA]
复制有误其他问题的可以附件
htaccess.rar
# BEGIN
# 任何对标记之间的指令的修改都会被覆盖。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.17179\.top$ [NC]
RewriteCond %{REQUEST_URI} !^/www17179top/
RewriteRule ^(.*)$ www17179top/$1?Rewrite [L,QSA]
RewriteCond %{HTTP_HOST} ^new\.172u\.top$ [NC]
RewriteCond %{REQUEST_URI} !^/new172utop/
RewriteRule ^(.*)$ new172utop/$1?Rewrite [L,QSA]
#可以绑定多个,只需重复上三行代码并更改一下域名、目录名就行了
</IfModule>
# END 说明分别2个域名 www.17179.top 与new.172u.top 路径我创建的跟域名一样去了.分别为www17179top 与new172uutop 单个PHP文件中基于Web的文件管理器,使用Tiny File Manager高效轻松地管理文件 https://tinyfilemanager.github.io
它是一个简单,快速和小型的文件管理器,具有单个php文件。它也是一个Web代码编辑器。它可以在Linux,Windows或Mac平台上在线或本地运行。唯一的要求是提供PHP 5.5+。
.index_top_img{padding: 180px 0 85px 0;margin-bottom:20px;background-image:url('https://cdn.jsdelivr.net/gh/javadeath/Store@latest/usr/uploads/2021/10/1433560926.jpeg');background-size: 100% 100% ;}
.index_top_text{color:#000000;}<div class="index_top_img">
<div class="container">
<div class="index_top_text">
<h2><?php $this->options->title();?></h2>
</div>
</div>
</div>