帮助HTML超链接不使用jQuery在datallist中显示弹出窗口 [英] help html hyperlink does not show popup in datallist using jquery

查看:68
本文介绍了帮助HTML超链接不使用jQuery在datallist中显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

当客户端单击该超链接时,我有一个包含一个html超链接按钮的数据列表,我想使用jquery显示弹出窗口,但是当我测试我的代码时,什么都没有发生.当我将相同的超链接放到数据列表之外时,它可以很好地工作.
数据列表出了什么问题

hi all

i have a datalist containing one html hyperlink button when client clicks on that hyperlink, i want to show popup window using jquery but when i test my code nothing happens. when i put same hyperlink outside the datalist it works perfectly .
what is going wrong in datalist

<script type="text/javascript">
function changeLabel()
{
$("#popupCon").css({
			"opacity": "0.7"
			
		});
}
$(document).ready(function() {
       document.getElementById('popupCon').style.display = 'none';
 $("#Button33").click(function(){
document.getElementById('popupCon').style.display = 'block';
        changeLabel()
});
$(document).keypress(function(e){
		if(e.keyCode==27){
			document.getElementById('popupCon').style.display = 'none';
}
});
        });
</script>





<a id="Button33"  runat="server">view details</a>


需要一些帮助


need some help

推荐答案

(" ).css({ " :" 0.7" }); }
("#popupCon").css({ "opacity": "0.7" }); }


(文档).ready( function (){ 文档 .getElementById(' popupCon') .style.display = ' none';
(document).ready(function() { document.getElementById('popupCon').style.display = 'none';


(" ).click(函数 (){ 文档 .getElementById(' popupCon') .style.display = ' block'; changeLabel() });
("#Button33").click(function(){ document.getElementById('popupCon').style.display = 'block'; changeLabel() });


这篇关于帮助HTML超链接不使用jQuery在datallist中显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆