Link to position on web page using class

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس

جستجوگر

یافته ها در جستجو

    امکانات وب

    آرشیو مطالب

    برچسب ها

    Vote count: 0

    I know that I can link to a position on a webpage by using an id. But is it possible for me to do that using a class.

    With an id it looks like this: href=#id. First you put the #, which is the id selector, and then the id.

    This works out very nice with id's because there's only one on a page. But there are usually multiple instances of a class, so in javascript to specify a single one you do class[index].

    With this in mind, I would assume that to link to classes I would do this: href=.class[index]. The . is the class selector, and [index] is to specify which class I'm pointing to.

    This obviously doesn't work (why else am I asking the community), so what I'm asking, in short, is: How do I get a link within a webpage that only has a class as a selector.

    asked 1 min ago
    Benzion Gross

    نویسنده : استخدام کار بازدید : 5 تاريخ : چهارشنبه 25 بهمن 1396 ساعت: 8:25
    برچسب‌ها :
    اخبار و رسانه هاهنر و ادبیاترایانه و اینترنتعلم و فن آوریتجارت و اقتصاداندیشه و مذهبفوتو بلاگوبلاگ و وبلاگ نویسیفرهنگ و تاریخجامعه و سیاستورزشسرگرمی و طنزشخصیخانواده و زندگیسفر و توریسمفارسی زبان در دیگر کشورها