javascript - 为什么CVS要扩展javascript调用?

标签 javascript html cvs

为什么 CVS 扩展下面的 SetDropdownList 调用

来自

SetDropdownList('BillPay', 'BillingState', '$State$');

SetDropdownList('BillPay', 'BillingState', '$State: Exp $');

在下面的 JavaScript 中?

我应该将 html 文件转换为二进制文件吗?

我已尝试以下步骤来调查此问题。我将 html 文件(其中包含 javascript 函数)复制到一个安全的地方;删除了该文件;输入CVS删除命令删除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;
}

最佳答案

$State 是 CVS 关键字,请参阅 http://csg.sph.umich.edu/docs/unix/cvs/cvsref-card.htmlhttps://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,我不知道有什么建议,大概他们有类似的选项来控制关键字扩展

关于javascript - 为什么CVS要扩展javascript调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27529233/

相关文章:

javascript - 使用 Angular 4 组件作为小部件(在静态网站上)

javascript - 如果指定了多个分隔符,javascript 的 split 函数如何通过分隔符工作

javascript - 扩展 SVG 路径

javascript - 在服务器上以 HTML5 播放远程音频(来自谷歌翻译)

javascript - 如何判断 html 元素是否已完全加载?

javascript - Bxslider 插件在第一个 "action"后停止工作

svn - 取消合并 cvs/svn 中的任意合并

javascript - 使用书签自动填写表单

cvs - 无法访问/path-to-repository/CVSROOT

version-control - 在命令行上执行 cvs 更新时,如何获得 cvs 冲突的摘要?