خصائص كلمة المرور لـ Anchor

تعريف والاستخدام

password تعيين أو رجوع الخاصية قيمة خاصية href جزء كلمة المرور.

في URL، جزء كلمة المرور هو كلمة المرور المدخلة من المستخدم. وهو معين بعد اسم المستخدم وبقرب اسم الخادم.

مثال: https://billgates:bill234@www.example.com (billgates هو اسم المستخدم، bill234 هو كلمة المرور).

نصيحة:استخدم خاصية username تعيين أو رجوع قيمة خاصية href جزء اسم المستخدم.

مثال

مثال 1

رجوع جزء كلمة المرور للرابط:

var x = document.getElementById("myAnchor").password;

جرب بنفسك

مثال 2

تغيير جزء كلمة المرور للرابط:

document.getElementById("myAnchor").password = "newPassword101";

جرب بنفسك

اللغة

رجوع فاتوريتي password:

anchorObject.password

Set password attribute:

anchorObject.password = password

Attribute Value

Value Description
password Specifies the password part of the URL.

Technical Details

Return value: A string value representing the password part of the URL.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Supported Not Supported Supported Not Supported Supported