html代码大写字母,大写第一个字母并去掉html代码

我有以下的html页面: 我想要做的是大写第一个字母(这是工作没有任何问题),并剥离任何html代码或任何代码的文本框“”“>>”的结合,所以用户不能在服务器端插入恶意代码来执行。大写第一个字母并去掉html代码

我发现这条代码:

var StrippedString = OriginalString.replace(/(]+)>)/ig,"");

如何上面的代码添加到以下页面,以便充分发挥了两者的照顾?

/**

* ****************************************************************************

* Micro Protector

*

* Version: 1.0

* Release date: 2007-09-10

*

* USAGE:

* Define your requested password below and inset the following code

* at the beginning of your page:

* <?php require_once("microProtector.php"); ?>

*

*

*

******************************************************************************/

$Password = 'TESTPASS'; // Set your password here

/******************************************************************************/

if (isset($_POST['submit_pwd'])){

$pass = isset($_POST['passwd']) ? $_POST['passwd'] : '';

if ($pass != $Password) {

showForm("Wrong password");

exit();

}

} else {

showForm();

exit();

}

function showForm($error="LOGIN"){

?>

IMC - Authentication
test.png

Your Name:

Password:

}

?>

+0

只能首字母大写或每个单词的第一个字母? –

+0

它的名字,所以我只是首字母大写。 –

+0

我在代码中看不到任何jQuery,是否有可能选择的标记不正确? –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值