href
属性的当前值是指向 "http://freecatphotoapp.com",将href
属性的值替换为#
,就可以创建固定链接。
+href
属性的当前值是指向 "https://freecatphotoapp.com",将href
属性的值替换为#
,就可以创建固定链接。
例如: href="#"
CatPhotoApp
点击这里可以获取更多猫咪图片。
+点击这里可以获取更多猫咪图片。
a
。'
- testString: assert(($("a[href=\"http://freecatphotoapp.com\"]").length > 0 || $("a[href=\"http://www.freecatphotoapp.com\"]").length > 0));
+ - text: '你需要一个指向 "https://freecatphotoapp.com" 的 a
。'
+ testString: assert(($("a[href=\"https://freecatphotoapp.com\"]").length > 0 || $("a[href=\"http://www.freecatphotoapp.com\"]").length > 0));
- text: 'a
的文本应为:cat photos。'
testString: assert($("a").text().match(/cat\sphotos/gi));
- text: '在 a
的外部创建一个新段落,这样页面就有 3 个段落了。'
testString: assert($("p") && $("p").length > 2);
- text: 'a
应嵌套在新段落内。'
- testString: assert(($("a[href=\"http://freecatphotoapp.com\"]").parent().is("p") || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().is("p")));
+ testString: assert(($("a[href=\"https://freecatphotoapp.com\"]").parent().is("p") || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().is("p")));
- text: '段落应该包含文本 View more(记得 more 后面有一个空格)。'
- testString: assert(($("a[href=\"http://freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi) || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi)));
+ testString: assert(($("a[href=\"https://freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi) || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi)));
- text: 'a
不应该包含文本 View more。'
testString: assert(!$("a").text().match(/View\smore/gi));
- text: '确保每个段落有结束标记。'
@@ -68,7 +68,7 @@ tests: