--- id: bad87fee1348bd9aedf08817 title: '用 # 號來創建鏈接佔位符' challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cMdkytL' forumTopicId: 18230 dashedName: make-dead-links-using-the-hash-symbol --- # --description-- 有時你想爲網站添加一個 `a` 元素,但還不確定要將它鏈接到哪裏。 當你使用 `JavaScript` 更改鏈接的指向時,這也很方便,我們將在後面的課程中介紹。 # --instructions-- `href` 屬性的當前值是指向 “`https://www.freecatphotoapp.com`”。 請將 `href` 屬性的值替換爲`#`,以此來創建鏈接佔位符。 例如: `href="#"` # --hints-- `a` 的 `href` 屬性值應爲 "#"。 ```js assert($('a').attr('href') === '#'); ``` # --seed-- ## --seed-contents-- ```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

``` # --solutions-- ```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

```