[英]jquery dialog box inside div button click to call ajax not working
This my dialog box code: 这是我的对话框代码:
$("#manageGroupShow").dialog({resizable: false,draggable: false,position:['center',150],title: "Manage Group",width:"50%",modal: true,show: { effect:"drop",duration:1000,direction:"up" },hide: { effect:"drop",duration:1000,direction:"up"}});
});
manageGroupShow html code: manageGroupShow html代码:
<div id="manageGroupShow" class="brdBlack" style="width: 50%;display: none;">
</div>
dynamically append inside the manageGroupShow div code: 动态地在manageGroupShow div代码内追加:
$("#manageGroupShow").append("<span><a
href="javascript:cancel('+dynamicvalues')>cancel</a>"</span>")
this href link not fired inside the dialogbox.how to call javascript call inside dialogbox. 在对话框内部未触发此href链接。如何在对话框内部调用javascript。 the span append dynamically multi times.so how to solve this problem?
跨度会动态多次追加。如何解决此问题?
Open-close the quotes correctly! 正确打开-关闭报价!
append("<span><a href=\"javascript:cancel('dynamicvalues')\">cancel</a></span>")
if dynamicvalues
is a variable 如果
dynamicvalues
是一个变量
append("<span><a href=\"javascript:cancel('"+dynamicvalues+"')\">cancel</a></span>")
What he said but use single quotes in JS string literals so that you never need to escape your html double quotes. 他说了什么,但是在JS字符串文字中使用了单引号,因此您无需转义html双引号。 There is never a need for double quotes in JS string literals.
从来不需要在JS字符串文字中使用双引号。
$('#manageGroupShow')append('<span><a href="javascript:cancel('+dynamicvalues+')">cancel</a></span>');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.