在JQuery中,将空格字符替换为'%20'。但仅适用于其他表单而不适用于单个表单。其中包含标题为
In jQuery,将空格字符替换为'%20',但只适用于其他表单而不适用于单个表单。其中包含标题。<header>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
</header>
在其他形式中使用的代码正常运行。
var vname = $("#EarningsTypes").val();
vname = vname.trim().replace(/ /g, '%20');
jQuery.noConflict();
#EarningTypes
元素的html
? - guest271314