亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP ?? ?? ??? ??? ?? HTML ???

new.jpg


? ??? ??? ??? ???? ??????

??? <??> ??? ??? CSS ??

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>PHP中文網(wǎng)</title>
   
    <style>
        body{
            background-color: rgba(128, 128, 128, 0.3);
        }
    </style>
    
</head>
<body>
<form  method="post" action="new_post.php" name="myform">
    <h1>發(fā)布新聞系統(tǒng)</h1>
    <p>標(biāo)題:<input type="text" name="title"/></p>
    <p>內(nèi)容:<textarea cols=30 rows=5 name="content"></textarea></p>
    <p><button>發(fā)布新聞</button></p>
</form>
</body>
</html>

??? ?? ?? ?? ?? ????? ? ?? ??? ?? ???. ???? ??? ?? ???? ??? ? ????. ??? ?? JS? ??????. <form> ??? ??? ????

<form method= "post" action="new_post.php "onsubmit=" return foo();" name="myform">
head

<script>
?? foo()? ?? ??? ?????. if(myform.title.value== ""){
??????????? Alert('?? ??? ?????') Alert(' ?? ???? ??? ? ????. ');
???? ?? new.html ??? ??? ????


<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>PHP中文網(wǎng)</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no" />
    <style>
        body{
            background-color: rgba(128, 128, 128, 0.3);
        }
    </style>
    <script>
        function foo(){
            if(myform.title.value==""){
                alert('請(qǐng)?zhí)顚?xiě)你的新聞標(biāo)題');
                myform.title.focus();
                return false;
            }
            if(myform.content.value==""){
                alert('新聞內(nèi)容不能為空哦');
                myform.content.focus();
                return false;
            }
        }
    </script>
</head>
<body>
<form  method="post" action="new_post.php" onsubmit=" return foo();" name="myform">
    <h1>發(fā)布新聞系統(tǒng)</h1>
    <p>標(biāo)題:<input type="text" name="title"/></p>
    <p>內(nèi)容:<textarea cols=30 rows=5 name="content"></textarea></p>
    <p><button>發(fā)布新聞</button></p>
</form>
</body>
</html>

?? ??? ?? ???? ??? ?? ??? new_post.php ???? ???? ???? ????




???? ??
||
<!doctype html> <html> <head> <meta charset="utf-8"> <title>PHP中文網(wǎng)</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="format-detection" content="telephone=no" /> <style> body{ background-color: rgba(128, 128, 128, 0.3); } </style> <script> function foo(){ if(myform.title.value==""){ alert('請(qǐng)?zhí)顚?xiě)你的新聞標(biāo)題'); myform.title.focus(); return false; } if(myform.content.value==""){ alert('新聞內(nèi)容不能為空哦'); myform.content.focus(); return false; } } </script> </head> <body> <form method="post" action="new_post.php" onsubmit=" return foo();" name="myform"> <h1>發(fā)布新聞系統(tǒng)</h1> <p>標(biāo)題:<input type="text" name="title"/></p> <p>內(nèi)容:<textarea cols=30 rows=5 name="content"></textarea></p> <p><button>發(fā)布新聞</button></p> </form> </body> </html>