<html>
<head>
<script>
<?php
$title = "unknow";
if(isset($_POST['submit'])){
$title = $_POST['tb_1'];
if($title == NULL ){
echo "alert('make sure to insert something')";
}else{
echo "alert('title has been change to " . $title .".')";}
}
?>
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><? echo $title ?></title>
</head>
<body>
<form action="<?php echo $PHP_SELF; ?>" method="post">
<input type="text" name="tb_1" id='tb_1' />
<input type="submit" value="Click me" name='submit'/>
</form>
</body>
</html>
欢迎光临 JBTALKS.CC (https://jbtalks.my/) | Powered by Discuz! X2.5 |