为什么CVS会在
下面扩展SetDropdownList调用来自
SetDropdownList('BillPay', 'BillingState', '$State$');
到
SetDropdownList('BillPay', 'BillingState', '$State: Exp $');
在下面的javascript中?
我应该将html文件转换为二进制文件吗?
我已尝试以下步骤来调查此问题。我将html文件(javascript函数所在的文件)复制到一个安全的地方;删除了文件;输入CVS delete命令删除CVS元素;然后使用add和commit从已保存的副本重新创建CVS元素。
尽管如此,SetDropdownList仍然如上所示进行了扩展。
function EnterPage()
{
var ElemID;
// Set the payment type and credit card radio buttons to their correct initial
// state (ACH payment, credit card choice 0).
SetRadioButton('BillPay', 'PaymentTypeID', 1);
SetRadioButton('BillPay', 'CCTypeID', 0);
// Make the credit card fields invisible. ACH is the default.
if (document.all && !document.getElementById) ElemID = document.all['CCTable'];
else ElemID = document.getElementById('CCTable');
ElemID.style.display = 'none';
// Fill in the various fields of the form that we know about. Note that we use
// double quotes, in case there are any apostrophes in the names.
document.forms['BillPay'].elements['ACHNameOnAccount'].value = "$FullName$";
document.forms['BillPay'].elements['CCNameOnCard'].value = "$FullName$";
document.forms['BillPay'].elements['BillingAddress1'].value = "$Address1$";
document.forms['BillPay'].elements['BillingAddress2'].value = "$Address2$";
document.forms['BillPay'].elements['BillingCity'].value = "$City$";
SetDropdownList('BillPay', 'BillingState', '$State$');
document.forms['BillPay'].elements['BillingZipcode'].value = "$Zipcode$";
document.forms['BillPay'].elements['Location'].value = "$Location$";
document.forms['BillPay'].elements['AcctType'].value = "$AcctType$";
document.forms['BillPay'].elements['BillYear'].value = "$BillYear$";
document.forms['BillPay'].elements['AcctNum'].value = "$AcctNum$";
document.forms['BillPay'].elements['BillAmount'].value = "$AmountPaid$";
document.forms['BillPay'].elements['ScholarAmount'].value = "$ScholarAmt$";
document.forms['BillPay'].elements['AmountPaid'].value = "$TotalAmt$";
// Make the scholarship donation visible, if there is one.
if (document.all && !document.getElementById)
ElemID = document.all['ScholarDonat'];
else ElemID = document.getElementById('ScholarDonat');
if ('$ScholarAmt$' != '0.00') ElemID.style.visibility = 'visible';
// The page is set up.
return;
}
答案 0 :(得分:2)
$State
是CVS关键字,请参阅http://csg.sph.umich.edu/docs/unix/cvs/cvsref-card.html和https://www.cs.utah.edu/dept/old/texinfo/cvs/cvs_16.html
"默认情况下,CVS执行关键字扩展,除非您告诉它停止。将文件添加到项目中时,可以使用-k选项永久禁止文件的关键字扩展",请参阅http://durak.org/sean/pubs/software/cvsbook/Controlling-Keyword-Expansion.html
它为抑制关键字扩展提供的命令行示例是:
$ cvs add -ko chapter-9.sgml
如果您使用TortoiseCVS,我不知道该建议什么,可能他们有一个类似的选项来控制关键字扩展