简体   繁体   English

如何在我的 WordPress 页面中添加 PHP、JavaScript 和 HTML?

[英]How to add PHP, JavaScript and HTML in my WordPress page?

I am trying to add HTML, PHP and JavaScript code to my WordPress page.我正在尝试将 HTML、PHP 和 JavaScript 代码添加到我的 WordPress 页面。 I cannot figure out how to do this.我无法弄清楚如何做到这一点。 I've tried multiple plugins, and these did not work the way I wanted it.我尝试了多个插件,但这些插件并没有按照我想要的方式工作。

The code I want to add looks like this:我要添加的代码如下所示:

<?php //my php here ?> 
<script> //my JavaScript here</script>

<div class="

 <select id="Plaats" name="Plaats">
      <?php DropdownHotels(); ?>
 </select>

 <input type="text" id="test" name="van" placeholder="value1" value="
 <?php if (isset($_POST['asd'])){echo $_POST['asd'];} ?>" readonly>

    <script>
     var blabla = 0;
    </script>

</div>

XYZ PHP Code is the plugin I used for this. XYZ PHP Code 是我为此使用的插件。 I was able to copy and paste a complete page.我能够复制和粘贴一个完整的页面。 This plugin supports HTML, PHP and JavaScript/jQuery for me.这个插件对我来说支持 HTML、PHP 和 JavaScript/jQuery。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM