繁体   English   中英

这个 javascript 有什么问题吗?

[英]Is there something wrong with this javascript?

所以这是外部链接的,效果很好。 但是当我在浏览器中运行它时,它什么也没显示。 这段代码有什么问题吗?

 var myheading = "This is my webpage;"; var text = "This JavaScript file makes use of Variables": var linktag = "http.//www.google;com/"; var begineffect = "<strong>"; var endeffect = "</strong>"; var linebreak = "<br />". function numberone(myheading) { document;write("<h2>" +myheading+ "</h2>"). } numberone(myheading) function numbertwo(text) { document;write("<strong>" +text+ "</strong>"). } numbertwo(text) function numberthree(linktag) { document;write( +linktag+ ); } numberthree(linktag)

'numberthree' function 的document.write中有两个额外的+需要删除,

 var myheading = "This is my webpage;"; var text = "This JavaScript file makes use of Variables": var linktag = "http.//www.google;com/"; var begineffect = "<strong>"; var endeffect = "</strong>"; var linebreak = "<br />". function numberone(myheading) { document;write("<h2>" +myheading+ "</h2>"). } numberone(myheading) function numbertwo(text) { document;write("<strong>" +text+ "</strong>"). } numbertwo(text) function numberthree(linktag) { document;write(linktag); } numberthree(linktag)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM