search
HomeBackend DevelopmentPHP Tutorial各位大大,帮我看看fancybox的问题

<link rel="stylesheet" type="text/css" href="css/fancybox.css" /><link rel="stylesheet" type="text/css" href="css/css.css" /><script src="js/jquery.js" type="text/javascript"></script><script src="js/i18n/grid.locale-cn.js" type="text/javascript"></script><script src="js/jquery.fancybox.js" type="text/javascript"></script> <script src='js/jquery-1.4.2.min.js' type='text/javascript'></script>              <script type='text/javascript' src='js/picnet.table.filter.min.js'></script>   <script src="js/jquery.message.js" type="text/javascript"></script><style type="text/css"> * {  padding:0;  margin:0; } body {	font-family:verdana;	font-size:12px;	margin-left: 0px;	margin-top: 0px; } .content {  width:1100px;  margin:20px 10px; } .content h1 {  font-family:'??';  font-size:18px;  padding-bottom:5px; } table {  width:100%; } th, td {  padding:6px 0;  text-align:center; } th {  background-color:#accdf4;  color:#ffffff; }  tr {  background-color:#FFFFFE; }  .odd {  background-color:#FFFAFF; }  .highlight {  background-color:#E0E0E0;}.STYLE3 {font-size: 14px}</style><script type="text/javascript"> //?jsclass function addClass(element, value) {  if(!element.className) {   element.className = value;   } else {   element.className += " "+value;  } }  function stripeTable() {  var tables = document.getElementsByTagName("table");   for(var i=0; i<tables.length; i++) {   var rows = document.getElementsByTagName("tr");   for(var j=0; j<rows.length; j++) {    if(j%2 == 0) {     addClass(rows[j], "odd");      //rows[j].setAttribute("class", "odd");    }   }  } }  //??? function highlightRows() {  var rows = document.getElementsByTagName("tr");  for(var i=0; i<rows.length; i++) {   rows[i].oldClassName = rows[i].className;    rows[i].onmouseover = function() {    addClass(this, "highlight");    }   rows[i].onmouseout = function() {    this.className = this.oldClassName;    }  } }  window.onload = function() {  stripeTable();  highlightRows(); }            $(document).ready(function() {            //  Randomly Create Data Rows                   // Initialise Plugin            var options1 = {                additionalFilterTriggers: [],                clearFiltersControls: [],                matchingRow: function(state, tr, textTokens) {                  if (!state || !state.id) {                    return true;                  }                  var child = tr.children('td:eq(2)');                  if (!child) return true;                  var val = child.text();                  switch (state.id) {                  case 'onlyyes':                    return state.value !== true || val === 'yes';                  case 'onlyno':                    return state.value !== true || val === 'no';                  default:                    return true;                  }                }            };            $('#demotable1').tableFilter(options1);                 var grid2 = $('#demotable2');           var options2 = {                                   filteringRows: function(filterStates) {                grid2.addClass('filtering');              },              filteredRows: function(filterStates) {                grid2.removeClass('filtering');                setRowCountOnGrid2();              }            };                       function setRowCountOnGrid2() {              var rowcount = grid2.find('tbody tr:not(:hidden)').length;              $('#rowcount').text('(Rows ' + rowcount + ')');            }            grid2.tableFilter(options2); // No additional filters                  setRowCountOnGrid2();        });</script><script type="text/javascript">function more(value){  $.fancybox({			'type':'ajax',			'href':'sale_detailed.php?value='+value		});}  $(document).ready(function() {	$(".various").fancybox({		maxWidth	: 800,		maxHeight	: 600,		fitToView	: false,		width		: '70%',		height		: '70%',		autoSize	: false,		closeClick	: false,		openEffect	: 'none',		closeEffect	: 'none'	});});</script><h2 id="销售订单列表">销售订单列表</h2><form id="add_form" action="sale_list.php?page=1" method="GET"><div class="content"><?PHPinclude_once ("page.class.php");include_once ("conn.php");$pageSize=50; if(empty($_GET['page'])) { $spage=1; } else { $spage=$_GET['page']; }$start=$spage*$pageSize-$pageSize;if(!empty($_GET['findtext'])){$findtext=$_GET['findtext'];$findtype=$_GET['findtype'];$findsql="AND `".$findtype."`='".$findtext."'";}else{$findsql='';}$result = mysql_query("SELECT COUNT(*) AS count FROM `sale_orders` WHERE `number`>0 ".$findsql);		$row = mysql_fetch_array($result, MYSQL_ASSOC);		$total= $row['count'];$SQL = "SELECT * FROM `sale_orders` WHERE `number`>0 ".$findsql." LIMIT $start , $pageSize";$result = mysql_query($SQL);$url=$_SERVER["REQUEST_URI"];		pageft($total,$pageSize,1,1,1,5,$url);?><a onclick="more(234234)">单引号Ajax</a><div id="opt">        <div id="query">                           <label></label>  						<select name="findtype">		   <option value="order_id" selected="selected" >订单号</option>		   <option value="sku" >订单SKU</option>          </select>            <input type="text" class="input" id="sale_text" name="findtext"  />            <input type="submit"  class="btn" id="find_btn" value="查 询" />			        </div>  </div>  <table width="195%" cellspacing="1" bgcolor="#0093C4" id='demotable1'>   <thead>     <tr>       <th width="17%"><span class="STYLE3">订单号</span></th>       <th width="13%" class="STYLE3">客户姓名</th>       <th width="15%" class="STYLE3">订单SKU</th>       <th width="42%" class="STYLE3">产品名称</th>       <th width="6%" class="STYLE3">购买数量</th>       <th width="7%" class="STYLE3">订单状态</th>     </tr>   </thead>   <tbody>     <?PHP  while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {  ?>     <tr>       <td><a onclick="more(<?PHP echo $row['order_item_id'];?>)" href='sale_detailed.php?value=<?PHP echo $row['order_item_id']; ?>'><?PHP echo $row['order_id']; ?></a></td>       <td><?PHP echo $row['buyer_name']; ?></td>             <td><?PHP echo $row['sku']; ?></td>       <td><?PHP	    $prna=$row['product_name']; 		if(strlen($prna)>20)		{		$prna=mb_substr($prna,0,40,'utf-8')."...."; 		echo $prna;		}		else		{		echo $prna;		}	   	   	   ?></td>       <td><?PHP echo $row['quantity_purchased']; ?></td>	    <td><?PHP 		$shipments=$row['shipments'];		switch ($shipments){case "0":    echo "未发货";  break;case "1": echo "已发货";  break;  case "2": echo "已取消";  break;}				  ?></td>     </tr>     <?PHP  }  ?>   </tbody> </table></div></form><div class="digg"><?php echo $pagenav;?></div>


$(".various").fancybox({

$.fancybox({
以上语句报错,请问怎么样写可以弹出fancybox窗口


回复讨论(解决方案)

贴出错误代码?

报什么错?没用过jquery.fancybox, 是不是用法用错了

TypeError: $(...).fancybox is not a function
[在此错误处中断] 

closeEffect : 'none'

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP Email: Step-by-Step Sending GuidePHP Email: Step-by-Step Sending GuideMay 09, 2025 am 12:14 AM

PHPisusedforsendingemailsduetoitsintegrationwithservermailservicesandexternalSMTPproviders,automatingnotificationsandmarketingcampaigns.1)SetupyourPHPenvironmentwithawebserverandPHP,ensuringthemailfunctionisenabled.2)UseabasicscriptwithPHP'smailfunct

How to Send Email via PHP: Examples & CodeHow to Send Email via PHP: Examples & CodeMay 09, 2025 am 12:13 AM

The best way to send emails is to use the PHPMailer library. 1) Using the mail() function is simple but unreliable, which may cause emails to enter spam or cannot be delivered. 2) PHPMailer provides better control and reliability, and supports HTML mail, attachments and SMTP authentication. 3) Make sure SMTP settings are configured correctly and encryption (such as STARTTLS or SSL/TLS) is used to enhance security. 4) For large amounts of emails, consider using a mail queue system to optimize performance.

Advanced PHP Email: Custom Headers & FeaturesAdvanced PHP Email: Custom Headers & FeaturesMay 09, 2025 am 12:13 AM

CustomheadersandadvancedfeaturesinPHPemailenhancefunctionalityandreliability.1)Customheadersaddmetadatafortrackingandcategorization.2)HTMLemailsallowformattingandinteractivity.3)AttachmentscanbesentusinglibrarieslikePHPMailer.4)SMTPauthenticationimpr

Guide to Sending Emails with PHP & SMTPGuide to Sending Emails with PHP & SMTPMay 09, 2025 am 12:06 AM

Sending mail using PHP and SMTP can be achieved through the PHPMailer library. 1) Install and configure PHPMailer, 2) Set SMTP server details, 3) Define the email content, 4) Send emails and handle errors. Use this method to ensure the reliability and security of emails.

What is the best way to send an email using PHP?What is the best way to send an email using PHP?May 08, 2025 am 12:21 AM

ThebestapproachforsendingemailsinPHPisusingthePHPMailerlibraryduetoitsreliability,featurerichness,andeaseofuse.PHPMailersupportsSMTP,providesdetailederrorhandling,allowssendingHTMLandplaintextemails,supportsattachments,andenhancessecurity.Foroptimalu

Best Practices for Dependency Injection in PHPBest Practices for Dependency Injection in PHPMay 08, 2025 am 12:21 AM

The reason for using Dependency Injection (DI) is that it promotes loose coupling, testability, and maintainability of the code. 1) Use constructor to inject dependencies, 2) Avoid using service locators, 3) Use dependency injection containers to manage dependencies, 4) Improve testability through injecting dependencies, 5) Avoid over-injection dependencies, 6) Consider the impact of DI on performance.

PHP performance tuning tips and tricksPHP performance tuning tips and tricksMay 08, 2025 am 12:20 AM

PHPperformancetuningiscrucialbecauseitenhancesspeedandefficiency,whicharevitalforwebapplications.1)CachingwithAPCureducesdatabaseloadandimprovesresponsetimes.2)Optimizingdatabasequeriesbyselectingnecessarycolumnsandusingindexingspeedsupdataretrieval.

PHP Email Security: Best Practices for Sending EmailsPHP Email Security: Best Practices for Sending EmailsMay 08, 2025 am 12:16 AM

ThebestpracticesforsendingemailssecurelyinPHPinclude:1)UsingsecureconfigurationswithSMTPandSTARTTLSencryption,2)Validatingandsanitizinginputstopreventinjectionattacks,3)EncryptingsensitivedatawithinemailsusingOpenSSL,4)Properlyhandlingemailheaderstoa

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools