3
嗨,我正在使用smartwizard 2.0插件,我不知道是否有人可以幫我在這裏。爲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函數後,沒有運氣,即使我嘗試綁定文檔中的ready函數,並在添加選項卡後觸發 –