数字和字符串相加

请补全预置代码片段中<script>标签中间的代码,具体要求如下:

  • 定义变量x,赋值3 + 5 + "8"

  • 使用document.getElementById(id)方法,使id为demo的段落返回x的值.

任务与要求

请定义变量

请按要求返回x的值

<!DOCTYPE html>

<html>

<body>

<p id="demo"></p>

<script>

</script>

</body>

</html>


qq_慕标6304929
浏览 767回答 0
0回答

莲_蓶濏__

<div id="demo"></div> <script> var x = 3 + 5 + "8"; document.getElementById('demo').textContent = x; </script>

慕斯4360584

CPMBYCGNRGATHHERYARBMQPMWLFSZQNBMFPCTUFTXNGGWANQVZGXHFZNKUUPZPWNUIAXIOMDMAOMSKVSCGXOBFMXGPMTNRYFACIPFXKWTUHBCKUKDEBCJXNGAEXFZAXVAQRFXYZGGDLYOSISBMCGNGQQKAKNUNECTHUXXADMZANWWWOGSVKYSYKYIRYILYLLJWJMDEUUXKEBUHINHQDDMISWJVJQSLEHIIKKJGQEKXKKBKUUCCQCFFCJFFQULIEEOERERFJJJSVISQLGNKTMWZJAKJEKIYOXJULZJWTKZBKGAKROHECCYONVSZMQAUVROREPDLISPOCMOGWBIVSZGHGJWGGKWTNURQDWSSILLWATPPTBIILCUVDCFSCCFZIEXLXHHHBHKNBRPNQROJCMJDWDPFQASILYVGZPNAEOEHRHKWTTKYVMMEYIUTPZJTSMWXDNJMRRKERLSJVOPHHEOLLZFXWLOGGYEVWTQHCFFNVVOWPTTPPTKKVGKOWOLEFSEYYQXFPPCMCZDOJGKQRHUXXKHEGXHPQGQXGDBZBTMQQKTIVZPTSFGGNGJSWWPMZCMTNAHKLTIJQRLZZPVLHMPRARIVICSVEFICWXRERYDQCEOCVLIEBVKBOSGALITGFNNZHMYVYPPOUDKYANOEWZFANTNEDAAXXZORSGHRDICMOWORRFVPWWGNHZBGHTZCCDTHWMQGCGDBU

慕斯4360584

ZZDKEVTUIFJZKZXIEOVPWAATLWYCCDROIKDQNOIVMMQXGSCVYJGTKLMCSKKBRSMQROPFRRSFVSQBESOVYZPOSCNGIVVJJ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GJDPFVCJJGTRWJZDSSFTPZPSZSIEOLOYHRRSTPPPWTWFPCWRATVPFLVUOUIENGKADCYFFMFLKUWWCMGWUGGWZPJMWOVTGZCQGJGZBICSLSGGHEROYPSUVZWCVVATKKOZJGZMFQNSYUVPISJPJICCORCIFMFWVQNZZMJQMGQXPLUEEEXZPZGFIOVLOOYRYLBCMVMFDCSENFLOAXRKXHAUUNAWJQNOUOOADPWZRBBRUQMTEARAXNXAXSRYVWWPZZKBAHNDGKQDTTZRBUUHEUBLYY
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript