i want to make a markup tag in html not executing by browser?
i want to make a markup tag in html not executing by browser???
so i keep information in it i want to parse it later
for example
&l开发者_如何学编程t;img src='<?=$photo;?>' class='image' border='0' width='220' height='170'/></a>
i want to fetch $photo later so i want to move it to another markup tag which not executing by browser
You could put it inside of a comment.
<!-- markup goes here -->
Or you could give it an id and use css to display:none
<tag id="tag1"></tag>
tag#tag1 { display: none; }
Or you could use style
<tag style="display:none"></tag>
You could first encode the content of the markup tag and then put that encoded tag inside a hidden input. When the page posted at server, you could then decode the tag and do processing as required.
To keep your page compliant, you could assign that data to javascript variables, or you could put it in whatever tags you want and either css style those tags as hidden or comment them out...
<!-- <myTag>My data is here </myTag> -->
<div style='display:none'>My data is here</div>
<script>
var myData='This is my data I can access it via javascipt';
</script>
精彩评论