JS Write (mixed) phpasp

Source: Internet
Author: User

Original: JS write (mixed) PHP ASP

JS write (mixed) PHP

Method 1:<br>
<script language= "JavaScript" >
document.write ("<?php echo" Sunshine Thank You "?>");
</script>
<Br>

<Br>
Method 2<br>
<script language= "JavaScript" >
<?php echo "alert (\" 85 Thank you \ "); >;

<?php echo "alert (' 85 thank you ');"? >;
</script>

Case THREE:

onclick= "Test (' <?phpecho $con [" P_name "]?> ')"
<script language= "javascript" type= "Text/javascript" >
<!--
function Test (a) {
alert (a);
location= ' orderlist.php?name= ' +a;

}
--></script>

Or:

onclick= "window.location.href= ' orderlist.php?name= ' + ' <?phpecho $con [" P_name "]?> '"


a judgment

<scriptlanguage= "JavaScript" >
<?php
$a = 1;
if ($a ==1)
echo "alert (' 85 thank you ');"? >;
</script>

<scriptlanguage= "JavaScript" >
function Check () {
<?php
if (!isset ($_cookie[' LoginId ')) {
echo "alert (' please log in after downloading ');";
echo "return false;";}
Else
echo "return True";
?>
}
</script>

"The things in the server will explain

"The things in the service may not be explained, the direct output

In PHP, you can have all the characters in a string.

2, JS mixed write ASP

<scriptlanguage= "JavaScript" >
<%
I=9
if (i=9) then
Response.Write "Alert (' 85 thank you ');"
End If
%>
</script>

JS write (mixed) PHP ASP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.