كما هو موضح أدناه:
وظيفة getStyle (العقدة ، الخاصية) {if (node.style [property]) {return node.style [property] ؛ } آخر if (node.currentStyle) {return node.currentStyle [property] ؛ } آخر if (document.defaultView && document.defaultView.getComputedStyle) {var style = document.defaultView.getComputedStyle (node ، null) ؛ Return Style.getPropertyValue (Property) ؛ } إرجاع فارغ ؛ }تحصل المقالة أعلاه JS على طريقة قيمة السمة (الموصى بها) في ورقة نمط CSS المشار إليها على الصفحة هي كل المحتوى الذي أشاركه معك. آمل أن تتمكن من إعطائك مرجعًا وآمل أن تتمكن من دعم wulin.com أكثر.