如何设置jquery事件的图像集?
因此,我试图获得一张图片来启动jquery显示函数。我失败了,我试了很多东西都没有用。jquery文档对我没有帮助:( 这是jquery,直接来自W3C。这就是我现在要做的一切如何设置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 = "../
$(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');