Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何设置jquery事件的图像集?_Jquery_Html_Css_Frontend - Fatal编程技术网

如何设置jquery事件的图像集?

如何设置jquery事件的图像集?,jquery,html,css,frontend,Jquery,Html,Css,Frontend,因此,我试图获得一张图片来启动jquery显示函数。我失败了,我试了很多东西都没有用。jquery文档对我没有帮助:( 这是jquery,直接来自W3C。这就是我现在要做的一切 $(document).ready(function(){ $("#regi").click(function(){ $("#reg").show(); }); }); 这是我试图展示的HTML,它从可见性开始:隐藏 <div id="reg"> <image src = "../

因此,我试图获得一张图片来启动jquery显示函数。我失败了,我试了很多东西都没有用。jquery文档对我没有帮助:(

这是jquery,直接来自W3C。这就是我现在要做的一切

$(document).ready(function(){
  $("#regi").click(function(){
    $("#reg").show();
  });
});
这是我试图展示的HTML,它从可见性开始:隐藏

<div id="reg">
  <image src = "../media/RegPage.png">
    <input type="text" name="usernameReg" value="email" STYLE="position: fixed; top: 175px; background-color: rgb(187,187,187); font-family: 'VT323', cursive;//#9cf;"/>
    <input type="password" name="pwrdReg" value="pass" STYLE="position: fixed; top: 195px; background-color: rgb(187,187,187); font-family: 'VT323', cursive;"/>
    <input type="password" name="VpwrdReg" value="pass" STYLE="position: fixed; top: 195px; background-color: rgb(187,187,187); font-family: 'VT323', cursive;"/>
</div>

这是图像。我尝试将其用作按钮并更改按钮的图像,但运气不佳。请帮助。希望单击此按钮可以触发jquery显示事件

<image id="show" src="../media/Register.png" ></image>

谢谢

什么是#regi

尝试将其更改为:

$(document).ready(function(){
  $("#show").click(function(){
    $("#reg").show();
  });
});

正如@undefined所说,将您的
图像
标记更改为
img
,因为HTML中没有
标记。

HTML中没有
图像
标记,您应该使用
img
标记,并且它没有结束标记

<img id="show" src="../media/Register.png" />
$("#reg").css('visibility', 'visible');