Table of Contents
销售订单列表
回复讨论(解决方案)
Home Backend Development PHP Tutorial 各位大大,帮我看看fancybox的问题

各位大大,帮我看看fancybox的问题

Jun 23, 2016 pm 02:09 PM

<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>
Copy after login


$(".various").fancybox({

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


回复讨论(解决方案)

贴出错误代码?

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

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

closeEffect : 'none'

Statement of this Website
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

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

How does session hijacking work and how can you mitigate it in PHP? How does session hijacking work and how can you mitigate it in PHP? Apr 06, 2025 am 12:02 AM

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

Describe the SOLID principles and how they apply to PHP development. Describe the SOLID principles and how they apply to PHP development. Apr 03, 2025 am 12:04 AM

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

What are Enumerations (Enums) in PHP 8.1? What are Enumerations (Enums) in PHP 8.1? Apr 03, 2025 am 12:05 AM

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.

How to debug CLI mode in PHPStorm? How to debug CLI mode in PHPStorm? Apr 01, 2025 pm 02:57 PM

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

See all articles