所以我有別人的舊代碼,我試圖恢復。我對jQuery不太熟悉,但是運算符指定了什麼?jQuery @運營商?
的代碼是:
v_button_format = $('#' + v_form_id).find('input[@name=button_format]').val();
v_content_type = $('#' + v_form_id).find('input[@name=content_type]').val();
我使用jQuery 1.3和它拋出 「未捕獲的異常:語法錯誤,無法識別的表達式:[@名稱= button_format]」 的錯誤。是否存在兼容性問題?
被@操作與當前的jQuery向後兼容? – powtac
@powtac:我不相信。 – SLaks
很少有話題,但對於這樣的事情是不是更好使用'document.getElementsByName'? –