


The large image will be displayed after hovering the mouse for three seconds, which is quite practical in web pages
<style> *{margin:0;padding:0;list-style-type:none;} img,a{border:0;} .piccon{height:75px;margin:100px 0 0 50px;} .piccon li{float:left;padding:0 10px;} #preview{position:absolute;border:1px solid #ccc;background:#333;padding:5px;display:none;color:#fff;z-index:2000;} </style>
<script type="text/javascript"> this.imagePreview = function(){ xOffset = 10; yOffset = 30; var urll; $(".widget .ks-content a,.box .ks-switchable-content div li a").hover(function(){ //$(".widget .ks-content a").hover(function(e){ //var goods_id = $(this).attr("href").replace("goods/", ""); var goods_id = $(this).attr("href").replace("index.php?app=goods&id=", ""); this.t = this.title; this.title = " "; var c = (this.t != "") ? "<br/>" + this.t : " "; $.post("index.php?app=default&act=ajaxBigImage", {goods_id: goods_id},function(data){ $.ajaxSettings.async = false; if(data!=0){ urll = data; $("body").append("<div id='preview'><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_51/small_201312121557314803.JPG" class="lazy" / alt="Automatically display the large image js code after hovering the mouse for three seconds_javascript skills" >"+ c +"</div>"); return true; }else{ return false; } }); /* $("#preview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); */ $('#preview').css({ position:'absolute', left: ($(window).width() - $('#preview').outerWidth())/2, top: ($(window).height() - $('#preview').outerHeight())/2 + $(document).scrollTop() }); setTimeout(function(){ $("#preview").fadeIn("fast"); },3000) }, function(){ this.title = this.t; $("#preview").remove(); }); /* $("a.preview").mousemove(function(e){ $("#preview") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); */ }; $(document).ready(function(){ imagePreview(); }); </script> <div id="_widget_579" name="jdr_sale_list" widget_type="widget" class="widget"> <div class="sale_list mt10 clearfix"> <h2 id="销售排行">销售排行</h2> <div> <ul class="ks-nav ks-nav1476271702"> <li class="ks-active nav1">特效礼花</li> <li class="nav2">套餐烟花</li> </ul> <div class="ks-content"> <ul class="box" id="box1_1476271702"> <li > <div class="pic"><a href="index.php?app=goods&id=331"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_51/small_201312121557314803.JPG" class="lazy" alt="【81发六锦系列组合烟花】" style="max-width:90%" style="max-width:90%"></a><b>1</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=331">【81发六锦系列组合烟花】</a></div> <div class="price">¥200.00</div> </div> </li> <li > <div class="pic"><a href="index.php?app=goods&id=336"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_33/small_201312121630335585.JPG" class="lazy" alt="【八喜系列组合烟花】五福临门、六六大顺、七星高照、八方得利" style="max-width:90%" style="max-width:90%"></a><b>2</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=336">【八喜系列组合烟花】五福临门、六六大顺、七星高照、八方得利</a></div> <div class="price">¥180.00</div> </div> </li> <li > <div class="pic"><a href="index.php?app=goods&id=375"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_193/small_201312130956337166.JPG" class="lazy" alt="【五福系列组合烟花】福运长流、福满人间、福寿满堂、福如东海、福到财来" style="max-width:90%" style="max-width:90%"></a><b>3</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=375">【五福系列组合烟花】福运长流、福满人间、福寿满堂、福如东海、福到财来</a></div> <div class="price">¥260.00</div> </div> </li> <li style="border-color:#fff;" > <div class="pic"><a href="index.php?app=goods&id=399"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_197/small_201312131059578989.JPG" class="lazy" alt="合家欢乐组合烟花\小礼花" style="max-width:90%" style="max-width:90%"></a><b>4</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=399">合家欢乐组合烟花\小礼花</a></div> <div class="price">¥480.00</div> </div> </li> </ul> <ul class="box box2" id="box2_1476271702" style="display:none;"> <li > <div class="pic"><a href="index.php?app=goods&id=310"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_92/small_201312121508128170.jpg" class="lazy" alt="套餐烟花-儿孙满堂" style="max-width:90%" style="max-width:90%"></a> <b>1</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=310">套餐烟花-儿孙满堂</a></div> <div class="price">¥888.00</div> </div> </li> <li > <div class="pic"><a href="index.php?app=goods&id=305"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_136/small_201312121455369033.jpg" class="lazy" alt="套餐烟花-六六大顺" style="max-width:90%" style="max-width:90%"></a> <b>2</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=305">套餐烟花-六六大顺</a></div> <div class="price">¥666.00</div> </div> </li> <li > <div class="pic"><a href="index.php?app=goods&id=303"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_118/small_201312121451582290.jpg" class="lazy" alt="套餐烟花-一路顺发" style="max-width:90%" style="max-width:90%"></a> <b>3</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=303">套餐烟花-一路顺发</a></div> <div class="price">¥1,688.00</div> </div> </li> <li style="border-color:#fff;" > <div class="pic"><a href="index.php?app=goods&id=300"><img src="/static/imghwm/default1.png" data-src="data/files/store_927/goods_14/small_201312121443346243.jpg" class="lazy" alt="套餐烟花-喜事连连" style="max-width:90%" style="max-width:90%"></a> <b>4</b></div> <div class="info"> <div class="title"><a href="index.php?app=goods&id=300">套餐烟花-喜事连连</a></div> <div class="price">¥1,288.00</div> </div> </li> </ul> </div> </div> </div> 后端处理 //ajax function ajaxBigImage() { if(!empty($_POST['goods_id'])){ $goods_id=$_POST['goods_id']; $goodsimg_mod = & m('goodsimage'); $uploadedfile_mod = & m('uploadedfile'); //$file_id = $goodsimg_mod->getOne("select file_id from `ecm_goods_image` WHERE goods_id={$goods_id} ORDER BY file_id DESC"); //获取file_id 字符串 $file_arr = $goodsimg_mod->getCol("select file_id from `ecm_goods_image` WHERE goods_id={$goods_id} ORDER BY file_id DESC"); if(!empty($file_arr)){ $file_str = implode(",",$file_arr); } //echo $file_str; $url_arr = $uploadedfile_mod->getAll("select file_type,file_path from `ecm_uploaded_file` WHERE file_id IN({$file_str}) ORDER BY add_time DESC"); if(!empty($url_arr)){ foreach ($url_arr as $v){ if($v['file_type'] == 'image/gif'){ $url = $v['file_path']; break; exit(); }else { unset($v); } } } //$url = $uploadedfile_mod->getOne("select file_path from `ecm_uploaded_file` WHERE file_id={$file_id} ORDER BY add_time DESC"); if(!empty($url)){ echo $url; exit(); }else{ echo 0; exit(); } }else{ echo 0; } }

Node.js excels at efficient I/O, largely thanks to streams. Streams process data incrementally, avoiding memory overload—ideal for large files, network tasks, and real-time applications. Combining streams with TypeScript's type safety creates a powe

The differences in performance and efficiency between Python and JavaScript are mainly reflected in: 1) As an interpreted language, Python runs slowly but has high development efficiency and is suitable for rapid prototype development; 2) JavaScript is limited to single thread in the browser, but multi-threading and asynchronous I/O can be used to improve performance in Node.js, and both have advantages in actual projects.

JavaScript originated in 1995 and was created by Brandon Ike, and realized the language into C. 1.C language provides high performance and system-level programming capabilities for JavaScript. 2. JavaScript's memory management and performance optimization rely on C language. 3. The cross-platform feature of C language helps JavaScript run efficiently on different operating systems.

JavaScript runs in browsers and Node.js environments and relies on the JavaScript engine to parse and execute code. 1) Generate abstract syntax tree (AST) in the parsing stage; 2) convert AST into bytecode or machine code in the compilation stage; 3) execute the compiled code in the execution stage.

The future trends of Python and JavaScript include: 1. Python will consolidate its position in the fields of scientific computing and AI, 2. JavaScript will promote the development of web technology, 3. Cross-platform development will become a hot topic, and 4. Performance optimization will be the focus. Both will continue to expand application scenarios in their respective fields and make more breakthroughs in performance.

Both Python and JavaScript's choices in development environments are important. 1) Python's development environment includes PyCharm, JupyterNotebook and Anaconda, which are suitable for data science and rapid prototyping. 2) The development environment of JavaScript includes Node.js, VSCode and Webpack, which are suitable for front-end and back-end development. Choosing the right tools according to project needs can improve development efficiency and project success rate.

Yes, the engine core of JavaScript is written in C. 1) The C language provides efficient performance and underlying control, which is suitable for the development of JavaScript engine. 2) Taking the V8 engine as an example, its core is written in C, combining the efficiency and object-oriented characteristics of C. 3) The working principle of the JavaScript engine includes parsing, compiling and execution, and the C language plays a key role in these processes.

JavaScript is at the heart of modern websites because it enhances the interactivity and dynamicity of web pages. 1) It allows to change content without refreshing the page, 2) manipulate web pages through DOMAPI, 3) support complex interactive effects such as animation and drag-and-drop, 4) optimize performance and best practices to improve user experience.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1
Easy-to-use and free code editor

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
