2013-03-05 109 views
-2

我不明白怎么可以隐藏状态栏的链接来客人,我的PHP代码如下:如何隐藏状态栏链接

//file column 
    echo '<td width="75%" class="default_td" align="left" valign="top"><a class="default_a" href="', $this_file; 
    $npart = $dir . $value; 
    if (preg_match('/\|$/', $value)) //it is a link, not an actual file 
    { 
     $value = substr($value, 0, -1); 
     $npart = substr($npart, 0, -1); 
     $display = get_stored_info($value, $dir.$links_file); 
     if ($display == '') 
     { 
      $display = $value; 
     } 
     echo 'dir=', translate_uri($subdir), '&amp;link=', 
      translate_uri($value), '" title="Click here to Download ', $filename, '">', 
      icon(ext($display)), htmlentities($display), '</a>'; 
    } 

,我已经找到了一个方法,该方法工作的HTML罚款。但我怎么能应用我的上面的PHP代码的方法或它如何工作?下面的方法:

<a style="cursor: pointer" onclick="javascript: window.location = 'http://www.mydomain.com/';">Go To SO</a> 

回答

0

只需在你的PHP中回显字符串,但记得要引号?

<?php 
    echo '<a style="cursor: pointer" onclick="javascript: window.location = \'http://www.mydomain.com/\';">Go To SO</a>'; 
    // Remember to escape 's as they're also used to create the string  ^^      ^^ 
?> 

另外;请不要发布一个链接到您的问题作为对其他问题的意见。相反,请尝试使用有效代码标记帖子,以便人们在首页上看到您的问题。对于你的文章,我建议甚至可能

为什么要隐藏链接?如果你有隐藏的数据,考虑隐藏字段,$_SESSION变量,变量$_POST,饼干等

+0

看到这些链接:http://www.silkroadbd.net/site-演示/ http://www.silkroadbd.net/site-demo/链接隐藏与javavoid,但链接不工作,当我点击 – 2013-03-05 19:29:12

+0

我的问题解决 – 2013-03-11 13:57:19

+0

@sanjidasona不要对所有人寻找如何解决这个问题的意思。更新你原来的帖子,并解释你做了什么来解决它,所以其他人搜索同样的问题会弄清楚他们做错了什么。 – h2ooooooo 2013-03-11 14:22:57

1

使用此代码:

<a href="http://pustakakoran.com" onMouseOver="window.status='Go to MyWebsite'; return true;" onMouseOut="window.status='';" >PustakaKoran</a> 
+0

“status属性在IE,Firefox,Chrome,Safari或Opera 15及更新版本的默认配置中不起作用。” :https://www.w3schools.com/jsref/prop_win_status.asp – dragoeco 2017-11-30 09:54:36