René's URL Explorer Experiment


Title: 【JavaScript】【学习心得】学习 JavaScript 第二天 · Issue #5 · paddingme/Learning-JavaScript · GitHub

Open Graph Title: 【JavaScript】【学习心得】学习 JavaScript 第二天 · Issue #5 · paddingme/Learning-JavaScript

X Title: 【JavaScript】【学习心得】学习 JavaScript 第二天 · Issue #5 · paddingme/Learning-JavaScript

Description: 【JavaScript】【学习心得】学习 JavaScript 第二天 昨天 JavaScript 第一天,洋洋洒洒三千字,但是 imooc 上竟然没有小伙伴而围观, 让我的心拔凉拔凉的,我这儿可是有满满的干货,还附赠逗比属性。另外 imooc 的编辑器竟然不支持 markdown,满地打滚要求 imooc 的攻城狮火速支持 markdown。好了废话不多说,治病看疗效,我还是踏踏实实的继续练习 JavaScript 吧。 昨天咱们已经学习了《JavaScript DO...

Open Graph Description: 【JavaScript】【学习心得】学习 JavaScript 第二天 昨天 JavaScript 第一天,洋洋洒洒三千字,但是 imooc 上竟然没有小伙伴而围观, 让我的心拔凉拔凉的,我这儿可是有满满的干货,还附赠逗比属性。另外 imooc 的编辑器竟然不支持 markdown,满地打滚要求 imooc 的攻城狮火速支持 markdown。好了废话不多说,治病看疗效,我还是踏踏实实的继续...

X Description: 【JavaScript】【学习心得】学习 JavaScript 第二天 昨天 JavaScript 第一天,洋洋洒洒三千字,但是 imooc 上竟然没有小伙伴而围观, 让我的心拔凉拔凉的,我这儿可是有满满的干货,还附赠逗比属性。另外 imooc 的编辑器竟然不支持 markdown,满地打滚要求 imooc 的攻城狮火速支持 markdown。好了废话不多说,治病看疗效,我还是踏踏实实的继续...

Opengraph URL: https://github.com/paddingme/Learning-JavaScript/issues/5

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"【JavaScript】【学习心得】学习 JavaScript 第二天","articleBody":"【JavaScript】【学习心得】学习 JavaScript 第二天\n\n昨天 JavaScript 第一天,洋洋洒洒三千字,但是 [imooc](http://www.imooc.com/wenda/detail/235627) 上竟然没有小伙伴而围观, 让我的心拔凉拔凉的,我这儿可是有满满的干货,还附赠逗比属性。另外 imooc 的编辑器竟然不支持 markdown,满地打滚要求 imooc 的攻城狮火速支持 markdown。好了废话不多说,治病看疗效,我还是踏踏实实的继续练习 JavaScript 吧。\n\n昨天咱们已经学习了《JavaScript DOM 编程艺术》第一章——JavaScript 简史 和 第二章——语法,咱们紧接着学习《第三章 DOM》,重点来了。\n## 节点\n- 元素节点\n- 文本节点\n- 属性节点\n## 获取元素\n1. `getElementById()` 方法可返回对拥有指定 ID 的第一个对象的引用;\n   \n   ``` javascript\n   document.getElementById(id);\n   ```\n2. `getElementsByTagName` 方法可返回带有指定名称的对象的集合;\n   \n   ``` javascript\n   document.getElementsByTagName(tag);\n   ```\n3. `getElementsByClassName` 方法可返回带有指定标签名的对象的集合。\n   \n   ``` javascript\n   document.getElementsByClassName(class); //(HTML5 DOM 新增)\n   ```\n\nid 属性为 purchase 的元素包括这多少个元素节点:\n\n``` javascript\nvar shopping = document.getElementById(\"purchase\");\nvar items = shopping.getElementByTagName(\"*\");\nalert(items.length);\n```\n\n新老浏览器实现 `getElementByClassName` (不支持多类名):\n\n``` javascript\nfunction getElementsByClassName(node,classname) {\n    if(node.getElementsByClassName){\n        return node.getElementsByClassName(classname);\n    } else {\n        var results = new Array();\n        var elems = node.getElementsByTagName(\"*\");\n        for(var i=0; i\u003celems.length; i++){\n            if(elems[i].className.indexOf(className) != -1) {\n                results[results.length]=elems[i];\n            }\n        }\n        return results;\n    }\n}\n```\n\n`indexOf()` 方法可返回某个指定的字符串值在字符串中首次出现的位置。  \n`stringObject.indexOf(searchvalue,fromindex)`  \n该方法将从头到尾地检索字符串 stringObject,看它是否含有子串 searchvalue。开始检索的位置在字符串的 fromindex 处或字符串的开头(没有指定 fromindex 时)。如果找到一个 searchvalue,则返回 searchvalue 的第一次出现的位置。stringObject 中的字符位置是从 0 开始的。\n## 总结下\n- 一份文档就是一棵节点树;\n- 节点分为不同的类型:元素节点,属性节点,文本节点等;\n- `getElementById` 将返回一个对象,该对象对应着文档里的一个特定的元素节点;\n- `getElementsByTagName` 和 `getElementsByClassName` 将返回一个对象数组,他们分别对应着文档里的一组特定的元素节点;\n- 每个节点都是一个对象。\n## `getAttribute`\n\n`object.getAttribute(attribute)`\n\n`getAttribute` 是一个函数,只有一个参数——你打算查询的属性的名字。\n\n`getAttrubute` 方法不属于 document 对象,所以不能通过 document 对象调用。它只能通过元素节点对象调用。\n## `setAttribute`\n\n`object.setAttribute(attribute,value)`\n\n`setAttribute` 也只能用于节点元素对象,主要用于对属性值做出修改。`setAttribute`做出的修改不会反映在文档本身的源代码里。\n\n这种表里不一的现象源自 DOM 的工作模式: 先加载文档的静态内容,再动态刷新,动态刷新不影响文档的静态内容。 这正是 DOM 的真正威力:对页面内容进行刷新却不需要在浏览器里刷新页面。\n\n好了,今天就学习到这里了,好好消化理解,see you tomorrow。\n","author":{"url":"https://github.com/paddingme","@type":"Person","name":"paddingme"},"datePublished":"2014-11-18T14:21:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/5/Learning-JavaScript/issues/5"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e12f7caa-70c8-30c2-4511-f581f764ccc4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id80C6:7DFC4:2AB8EEF:3E0CE5C:6A60EFB8
html-safe-nonce1e7eb89fee80199f1a105bb57265c78c1eaed98495e04140e8455816c36151df
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEM2OjdERkM0OjJBQjhFRUY6M0UwQ0U1Qzo2QTYwRUZCOCIsInZpc2l0b3JfaWQiOiIzMjExMDMxOTAxNDgzNjI2NDI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3e979b9fdbe940c71cc78fa06a3f7e0bdd06c2774071e0ed4c371c610b5b8e99
hovercard-subject-tagissue:49236064
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/paddingme/Learning-JavaScript/5/issue_layout
twitter:imagehttps://opengraph.githubassets.com/35e56509e21a70701c686bbe45d69c302aa41059720ceacd2c3b0daa5f104670/paddingme/Learning-JavaScript/issues/5
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/35e56509e21a70701c686bbe45d69c302aa41059720ceacd2c3b0daa5f104670/paddingme/Learning-JavaScript/issues/5
og:image:alt【JavaScript】【学习心得】学习 JavaScript 第二天 昨天 JavaScript 第一天,洋洋洒洒三千字,但是 imooc 上竟然没有小伙伴而围观, 让我的心拔凉拔凉的,我这儿可是有满满的干货,还附赠逗比属性。另外 imooc 的编辑器竟然不支持 markdown,满地打滚要求 imooc 的攻城狮火速支持 markdown。好了废话不多说,治病看疗效,我还是踏踏实实的继续...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepaddingme
hostnamegithub.com
expected-hostnamegithub.com
None3ba36a464b9464992131f4003292a219fc87f92404b0dbe3fd1ef07f11102d0f
turbo-cache-controlno-preview
go-importgithub.com/paddingme/Learning-JavaScript git https://github.com/paddingme/Learning-JavaScript.git
octolytics-dimension-user_id5771087
octolytics-dimension-user_loginpaddingme
octolytics-dimension-repository_id25473884
octolytics-dimension-repository_nwopaddingme/Learning-JavaScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id25473884
octolytics-dimension-repository_network_root_nwopaddingme/Learning-JavaScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2cc5e4f897a27632dd600edfec4c737bea2f8338
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/paddingme/Learning-JavaScript/issues/5#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpaddingme%2FLearning-JavaScript%2Fissues%2F5
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpaddingme%2FLearning-JavaScript%2Fissues%2F5
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=paddingme%2FLearning-JavaScript
Reloadhttps://github.com/paddingme/Learning-JavaScript/issues/5
Reloadhttps://github.com/paddingme/Learning-JavaScript/issues/5
Reloadhttps://github.com/paddingme/Learning-JavaScript/issues/5
paddingme https://github.com/paddingme
Learning-JavaScripthttps://github.com/paddingme/Learning-JavaScript
Notifications https://github.com/login?return_to=%2Fpaddingme%2FLearning-JavaScript
Fork 13 https://github.com/login?return_to=%2Fpaddingme%2FLearning-JavaScript
Star 28 https://github.com/login?return_to=%2Fpaddingme%2FLearning-JavaScript
Code https://github.com/paddingme/Learning-JavaScript
Issues 30 https://github.com/paddingme/Learning-JavaScript/issues
Pull requests 0 https://github.com/paddingme/Learning-JavaScript/pulls
Actions https://github.com/paddingme/Learning-JavaScript/actions
Projects https://github.com/paddingme/Learning-JavaScript/projects
Wiki https://github.com/paddingme/Learning-JavaScript/wiki
Security and quality 0 https://github.com/paddingme/Learning-JavaScript/security
Insights https://github.com/paddingme/Learning-JavaScript/pulse
Code https://github.com/paddingme/Learning-JavaScript
Issues https://github.com/paddingme/Learning-JavaScript/issues
Pull requests https://github.com/paddingme/Learning-JavaScript/pulls
Actions https://github.com/paddingme/Learning-JavaScript/actions
Projects https://github.com/paddingme/Learning-JavaScript/projects
Wiki https://github.com/paddingme/Learning-JavaScript/wiki
Security and quality https://github.com/paddingme/Learning-JavaScript/security
Insights https://github.com/paddingme/Learning-JavaScript/pulse
【JavaScript】【学习心得】学习 JavaScript 第二天https://github.com/paddingme/Learning-JavaScript/issues/5#top
Mu-Help-Planhttps://github.com/paddingme/Learning-JavaScript/issues?q=state%3Aopen%20label%3A%22Mu-Help-Plan%22
https://github.com/paddingme
paddingmehttps://github.com/paddingme
on Nov 18, 2014https://github.com/paddingme/Learning-JavaScript/issues/5#issue-49236064
imoochttp://www.imooc.com/wenda/detail/235627
Mu-Help-Planhttps://github.com/paddingme/Learning-JavaScript/issues?q=state%3Aopen%20label%3A%22Mu-Help-Plan%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.