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