1.PHP
a.PHP -> HTML & JavaScript
html code
<input type="" readonly="readonly" style='background-color:#DCDCDC' value=<?php echo $perinfo[ID];?> />
JavaScript code
Copy code The code is as follows:
<script type="text/javascript"> var ability=<?php echo JSON($array);?>; </script>
b.PHP MySQL
php In the code
The code is as follows:
<?php $dbcnx = @mysql_connect ( "localhost", "root", "1234" ); if (! $dbcnx) { echo ("Unable to connect to the " . "database server at this time."); exit (); } if (! @mysql_select_db ( "pms" )) { echo ("Unable to locate the joke " . "database at this time."); exit (); } mysql_query ( "SET NAMES 'GB2312'" ); $q=mysql_query("select * from ability where ALV = 1"); while($row=mysql_fetch_array($q)){ $array1[] = $row[AName]; } ?>
2.HTML
a. HTML -> PHP (POST method)
In the html code
Copy the code The code is as follows:
<form id="form" name="form" method="POST" action="do.php"> <input type="hidden" id="count" name="count" value="1"/> <input type="submit" name="Submit" value="Search"/> </form>
do.php In the file code
Copy the code The code is as follows:
<?php echo $_POST['count']; ?>
b. HTML -> JavaScript
JavaScript code (available and can be changed)
Copy code The code is as follows:
<script type="text/javascript"> var te = document.getElementById("count"); te.value = 1; </script>
3.JavaScript
a. JavaScript -> HTML ( Common law, not verified)
The
code in the JavaScript code is as follows:
<script type="text/javascript"> function f(){ var id = "2"; var a = document.getElementById("a"); a.href.replace("(n)", id); } </script>
html code
The code is as follows:
<a id="a" href="http://www.php1.cn/"> b. JavaScript -> PHP
Transfer through html
1. The JavaScript code is given to html first
The code is as follows:
<script type="text/javascript"> var i = 1; var te = document.getElementById("count"); te.value = i; </script>
2.html code is sent to php
The code is as follows:
<form id="form" name="form" method="POST" action="do.php"> <input type="hidden" id="count" name="count" value="1"/> <input type="submit" name="Submit" value="Search"/> </form>
3.do.php receives
The code is as follows:
<?php echo $_POST['count']; ?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)