不仅仅是" Some Text" onClick function()innerHTML

时间:2016-01-27 04:00:24

标签: onclick innerhtml

我试图添加更多阅读但我想要添加的内容不断破坏我的代码。它不只是"一些文字"改为"其他一些文字"它是一个巨大的段落。有人请帮忙!

            <div id="caption">me Shakur</h2>

                <span></span>
                <h2>Mopreme Shakur</h2>
                <p id="1">To Know the Legend is to Understand the Legacy Known as “Little Mutulu,” Mopreme Shakur was bor
                n to political activist father Mutulu Shakur and mother Sharan Harding in South Jamaica, Queens. He was 
                raised in South Jamaica for most of his life with the exception of a few years as a child, when Mopreme
                 lived with his father Mutulu, his father’s wife Afeni and their children, Sekyiwa and Tupac in Harlem. 
                 Their father’s activity with the Black Panthers and his role in exposing the Cointelpro Papers that 
                 brought to light the series of FBI counterintelligence programs from 1956-1971 that were designed to
                  create dissidence and division within the Civil Rights Movement sent Mutulu into hiding and separated
                   Mopreme from Tupac and Sekyiwa.</p>

                   <button id="RM1" class="more">READ MORE</button>
            </div>
            <script type="text/javascript" >
            document.getElementById("RM1").onclick=function(){
                document.getElementById("1").innerHTML="HERES WHERE I WANT TO PUT THE FULL VERSION WITH THE READ LESS BUTTON IN html "
                }
                </script>

我该怎么做?

0 个答案:

没有答案