Login | Register | FAQ
Anonymous

Hyper link and inserting image

+ Post a reply

3 posts Page 1 of 1


Hyper link and inserting image

by Chikwado » Tue Dec 09, 2014 5:42 pm

Some one check the following javascript. <html> <body> <p id="message"></p> <script> var person="my javascript excutable text here"; var people="Another javascript excutable text here"; document.getElementById("message").innerHTML= person + "<br>" + people;</script> </body> </html> When I process this code it show me result: my javascript excutable text here. Another javascript excutable text here. Ok, my question is this: Is it possible to insert image or hyper link in that excuted javascript text? Some one help.
User avatar

Chikwado

  • Posts: 94
  • Joined: Mon Jul 29, 2013 11:36 pm
  • Location: Nigeria
--
Focus On Advance Science And Programming.

Re: Hyper link and inserting image

by XainPro » Thu Dec 11, 2014 11:17 am

yes you can do it like this

Code: Select all
<html> <body>
<p id="message"></p>
<script> var person="<a href='index.html'>Hyper Link</a>"; var people="Another javascript <img src='image.jpg' /> text here"; document.getElementById("message").innerHTML= person + "<br>" + people;</script>
</body> </html>
User avatar

XainPro

  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: Hyper link and inserting image

by Chikwado » Fri Dec 12, 2014 7:23 am

Congratulations! Thanks a lots.
User avatar

Chikwado

  • Posts: 94
  • Joined: Mon Jul 29, 2013 11:36 pm
  • Location: Nigeria
--
Focus On Advance Science And Programming.


+ Post a reply

Page 1 of 1