Dear All,
Hopefully I have a simple problem. Basically, I just want to alter some text
with JS.
Here is some of my test code:
<snip>
<script type="text/javascript">
var tmp='a';
function myfunction(){
tmp='b';
}
</script>
<input type="button" onClick=javascr ipt:myfunction( ) >
<script type="text/javascript">
document.write( tmp);
</script>
<snip>
So when variable tmp is updated, I want to change the 'document.write (tmp)'
to reflect this.
If there is a better of changing text, feel free to suggest it.
Many thanks
Colin
Hopefully I have a simple problem. Basically, I just want to alter some text
with JS.
Here is some of my test code:
<snip>
<script type="text/javascript">
var tmp='a';
function myfunction(){
tmp='b';
}
</script>
<input type="button" onClick=javascr ipt:myfunction( ) >
<script type="text/javascript">
document.write( tmp);
</script>
<snip>
So when variable tmp is updated, I want to change the 'document.write (tmp)'
to reflect this.
If there is a better of changing text, feel free to suggest it.
Many thanks
Colin
Comment