原创:张荣国
有时,我们在做网页的时候,难免有时要用到内嵌外部的网页,比如一些数据网页等。这时,我们为了能和自己的网页完美容和,一般会用内嵌代码:iframe,但外部网页毕竟不是自己的,有些也带其自身网站链接,虽内嵌在我们网页上,但人家一点击,一般是会弹窗到他家网页或直接跳转。这不利于与我们的网页融合,也让人一看就知道外跳不是你站的。所以,我们若不需跳转的内容的话,我们可以使用代码,让该内嵌框架的所有点击链接无效就可以了。其实很简单,我举个例:
比如你有个内嵌框架代码为:
<iframe width="320" scrolling="no" height="80" frameborder="0" allowtransparency="true" src="https://zhangrongguo.com/kj.html"></iframe>
这个内嵌后,就无框,完美融合,但是如果该页面kj.html里有链接,虽在你站内,但点击有可能就外跳了。所以,我们用以下代码使其点击链接失效就可,代码如下:
点击数:1031
If you would like to improve your knowledge
simply keep visiting this web site and be updated with the most recent news posted here.
Greetings from Colorado! I’m bored at work so I decided to browse your website on my
iphone during lunch break. I love the knowledge you present here and can’t wait
to take a look when I get home. I’m shocked at how quick your blog loaded on my mobile ..
I’m not even using WIFI, just 3G .. Anyhow, fantastic site!
krAWEZYLtQBif
StxZvulIBVb