Skip to content
字数
79 字
阅读时间
1 分钟
html
<!DOCTYPE html>

<html lang="en">

    <meta charset="UTF-8">

    <head>

        <title>排序测试</title>

        <link rel="stylesheet" type="text/css" href="paixu.css">

  
  

    </head>

  

<body>

    <form>

        <input type="text" id = "inputValue">

    </form>

    <button onclick="reverseString()">reverse</button>

    <div class="result" id="showValue"></div>

  
  
  
  
  
  
  
  
  
  

</body>

<script>

function reverseString(){

    const inputValue = document.getElementById('inputValue').value;

    exportValue = inputValue.split('').reverse().join('');

    document.getElementById('showValue').textContent=`this is result :\n \ \ \ \ ${exportValue}`;

  
  

}

  
  

</script>

</html>

贡献者

The avatar of contributor named as sunchengzhi sunchengzhi

文件历史

撰写