-2

我正在使用 PHP 从 mySQL 中检索数据并能够显示它,例如列表项中的职位。并希望在单击时在弹出窗口中显示工作技能和描述。每个职位都有独特的技能和描述。请帮我...

示例代码:

<?php

//including the database connection file
include_once("includes/db.php");


// Get all the data from the table
$result = mysql_query("SELECT * FROM job_posting ORDER BY id DESC") or die(mysql_error());  

echo "<ul>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array($result)) {
    // Print out the contents of each row into a table
    echo "<li> <a href='post_resume.php?id=".base64_encode($row['id'])."'>" . $row['title'] . "</a></li>";
}
echo "<ul>";

?>
4

1 回答 1

0

参考:http: //jqueryui.com/dialog/

在你的 li 里面放一个 div 。

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
          <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
          <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>

      <script>
      $(function() {
        $( ".dialog" ).dialog({ autoOpen: false });
      });
      </script>
<body>



 <ul>   
  <li>   
    <div class="dialog" title="SOME TEXT">
      <p>

                     JOB SKILLS AND DESCRIPTION

       </p>
    </div>    </li>  </ul>  </body>
于 2013-02-13T07:05:00.327 回答