您好,我正在使用smartwizard 2.0插件,我想知道是否有人可以在这里帮助我。
基本上,我试图在用户单击“某些”按钮时动态添加另一个菜单。我给出了下面的代码。
function add_submenu() {
var ulid = document.getElementById("ulsub1");
var newli = document.createElement("li");
newli.innerHTML = "<a href=\"#step-7\" class=\"done\" isdone=\"1\" rel=\"7\"><label class=\"stepNumber\">7</label><span class=\"stepDesc\">Dy Coupon<br /></span></a>";
ulid.appendChild(newli);
var maintab = document.getElementById("stpContainer");
var newdiv = document.createElement("div");
newdiv.setAttribute('id', 'step-7');
newdiv.setAttribute('class', 'content');
newdiv.setAttribute('style', 'display: block;');
newdiv.innerHTML = "<h2 class=\"StepTitle\">Dynamic Coupon</h2><table cellspacing=\"3\" cellpadding=\"3\" align=\"center\"><tr><td align=\"center\" colspan=\"3\"> </td></tr><tr><td align=\"right\">Hello Name :</td><td align=\"left\"><input type=\"text\" id=\"coupon-8\" name=\"Coupon Name\" class=\"txtBox\"></td><td align=\"left\"><span id=\"msg_firstname\"></span> </td></tr></table>";
maintab.appendChild(newdiv);
}我面临的问题是添加的菜单不能根据功能工作。
任何帮助都是非常感谢的。
您可以在此网站http://techlaboratory.net/products.php?product=smartwizard&action=2中找到smartwizard 2.0
发布于 2013-03-13 22:04:46
我可能会迟到,但您应该在添加新菜单后再次尝试调用smartWizard函数。
https://stackoverflow.com/questions/10518322
复制相似问题