Design a program in js so that it can print itself]
If you need to introduce external Js, you need to refresh to execute
]
[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh to execute
]
[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh to execute
]
Suddenly this question seems like There is nothing to discuss:
If you want to print all the code, add at the end of the program:
alert(document.getElementsByTagName("script")[0].outerHTML)
If you remove <script></script>
alert(document.getElementsByTagName("script")[0].innerHTML);
<script>(function(){alert("<script>"+arguments.callee+"()<\/script>")})()</script> <script>
function a() { document.write(a, "a()");}a()
</script>[Ctrl A select all Note: <script>(function a(){alert("<script>"+a+"()<\/script>")})()</script>If you need to introduce external Js, you need to refresh to execute <script>
function AnyCode()
{
// Any Code
}
var anyCode = 0;
alert(document.getElementsByTagName("script")[0].outerHTML)
</script>]
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn