1
我有這樣的javascript代碼:querySelectorAll不僞類第n個最後的孩子一起
var fieldsets = document.querySelectorAll('fieldset:nth-last-child("-n+2")');
console.log('fieldsets' + fieldsets);
而且我有4個字段集
我得到這個錯誤在Chrome檢查:
Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Document': 'fieldset:nth-last-child("-n+2")' is not a valid selector.
我希望有人能幫忙! 謝謝:)!