本文实例为大家分享了jQuery实现鼠标滑动切换图片的具体代码,供大家参考,具体内容如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>手风琴</title> <script src="/UploadFiles/2021-04-02/jQuery.js">再补充一段:鼠标移动切换图片操作
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript"> function picture(pic){ //id读取图片及路径 document.getElementById('pic').src='ps/'+pic; } </script> </head> <body> <img id="pic" src="/UploadFiles/2021-04-02/01.jpg">以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。