2016-07-06 92 views

回答

0
<?php $title = "My Test Title"; ?> 
<ul> 
      <li> 
     <a href="#" class="offset" title="<?php echo htmlspecialchars($title); ?>"> 
      <img src="img/2.jpg" alt="" class="imagequery"> 
     </a> 
    </li> 
     </ul> 
+0

標題是動態的,它來自發布的帖子不是靜態的註釋。 – djhru

2
//yes it is possible 
    <ul> 
    <li> 
    <?php $title="The sun escaping the horizon";?> 
    <a href="#" class="offset" title="<?php echo $title;?>"> 
    <img src="img/2.jpg" alt="" class="imagequery"> 
    </a> 
    </li> 
    </ul>