Jump to content

javascipt syntax problem - probably very simple to solve


jug

Recommended Posts

all i need to do is find out the correct syntax so i can put a variables value where there is *variablehere* - im sure this is very simple. Any help would be much appreciated.

 

  *variablehere* .insertBefore(parent, *variablehere* .firstChild);

 

thanks in advance

 

jug

I assume ur luking 4 replace method for Strings in javascript.

 

Syntax: stringObject.replace(findstring,newstring)

 

Example: replace the word Microsoft with W3Schools

<script type="text/javascript">

  var str="Visit Microsoft!"

  document.write(str.replace(/Microsoft/, "W3Schools"))

</script>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.