|
![]() |
# 1 |
חבר בקהילה
|
[HTML] תג target...
שלום... במהלך קידוד אתרי ל"התאמה" לתקני הXHTML נתקלתי בבעיה בה תג Target אינו "מאושר"
הכוונה היא שהקוד: HTML קוד:
<a href="bla.html" target="_blank">קישור</a> התקלה: קוד:
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/oR use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash. Last edited by darkid; 09-06-07 at 14:41.. סיבה: שיפור נוסח |
![]() |
![]() |
# 2 | |
Авторитет
|
הפתרון בציטוט שלך:
קוד:
you must use the "Transitional" document type to get the "target" attribute קוד:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
__________________
![]() ציטוט:
|
|
![]() |
![]() |
# 3 |
חבר בקהילה
|
כל שאר העיצוב מותאם ל STRICT...
אבל נבדוק, דקה. עריכה: צצים לי עשרות שגיאות אחרות עכשיו... Last edited by darkid; 09-06-07 at 15:06.. |
![]() |
![]() |
# 4 |
A Al Alm Almo Almog!
תודה על תרומתך! |
אין כזה דבר target.
הוא ירד בתקן. אתה צריך לעשות משהו חלפי. למשל פונקציה ב JS שתעשה את העבודה. |
![]() |
![]() |
# 5 |
אחראי פורום
|
HTML קוד:
<a href="LinkToOpenInNewWindow" onclick="window.open('URL');">Link</a> |
![]() |
![]() |
# 6 | |
A Al Alm Almo Almog!
תודה על תרומתך! |
ציטוט:
וחוץ מזה שאם תגיד לו לשים void(0);, כדי שזה לא יעבור, אז הבעיה תיהיה שזה לא יהיה טוב למנועי החיפוש, והם לא יוכלו לאנדקס את הכתובות. אני ממליץ לך לעשות ככה: HTML קוד:
function NewWin(URL) { window.open(URL); return false; } <a href="http://www.fre.co.il" onclick="return NewWin(this.href);">aa</a> פונקציה פשוטה, שמקבלת את הערך של HREF, ופותחת אותו בחלון חדש. היא מחזיקה FALSE, כדי שהחלון הנוכחי, לא יעבור לכתובת של HREF גם כן. THIS.HREF= הערך של HREF, אתה לא צריך לשנות אותו, הערך הזה מלא כבר ב HREF של אותו A. |
|
![]() |
![]() |
# 7 |
משתמש - היכל התהילה
|
הבנתי שבגרסא הבאה רוצים להחזיר אותו =\
|
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|