echo <a href='index.php? subject_id=8'>测试<a> .$_SERVER['QUERY_STRING'];我想获取‘?’后面

宝宝妈妈2023-05-28  47

当然有问题!

index.php

<html>

    <head>

        <title>My Store</title>

    </head>

    <body>

        <a href='index1.php?subject_id=8'>Test</a>

    </body>

</html>

index1.php

<?php 

    echo $_SERVER['QUERY_STRING']

?>

这个是我写的,比较简单的~

<a></a>表示一个超链接标签 点击它就会跳转到某个页面

href="index.html" 表示要跳转的页面 当点击时就会跳转到index.html这个页面

onmouserover是一个事件 当鼠标经过这个超链接的时候就会触发后面的动作alert('welcome');

alert('welcome')是javascript里面的一个函数 意思是弹出对话框 对话框的内容是welcome

return false的意思就是返回false 在这里没有多大意义

不知道够不够详细


转载请注明原文地址:https://54852.com/read/716363.html