我有一个脚本。我将展示示例。
<form>
<textarea id='input'></textarea>
<input onclick="convert()" value="go function" />
<textarea id="output"></textarea>
</form>
<script type="text/javascript" >
function convert() {
src = document.getElementById("input").value;
document.getElementById("output").value = Z1_Uni(src);
}
function Z1_Uni(input)
{
var output=input;
var tallAA = "\u102B";
var AA = "\u102C";
var vi = "\u102D";
var ii = "\u102E";
var u = "\u102F";
var uu = "\u1030";
}
</script>
此示例将使用 javascript 显示输出结果。我想用 php 重写。
示例如下。
<form action="convert.php" method="post">
<textarea id="input" name="input"></textarea>
<input type="submit" Value="go to convert page">
</form>
转换.php
<?php $input=$_POST['input'];
$output=(?????????????? );
//(Here javascript function will be work.I want to know this step.)
?>