可能是一个非常愚蠢的问题,如果是这样的话,请随意标记。
我有一个Vagrant框,可以将我的主机的<html>
<head>
<title>game</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script> <![endif]-->
<script type="text/javascript" src="html5-canvas-drawing-app.js"> </script>
<script language="javascript">
var imagesArray = [ 'images/img-1.jpg', 'images/img-2.jpg',
'images/img-3.jpg', 'images/img-4.jpg', 'images/img-5.jpg',
'images/img-6.jpg', 'images/img-7.jpg', 'images/img-8.jpg',
'images/img-9.jpg', 'images/img-10.jpg', 'images/img-11.jpg',
'images/img-12.jpg' ];
var usedImages = {}; var usedImagesCount = 0;
function displayImage(){
var num = Math.floor(Math.random() * (imagesArray.length));
if (!usedImages[num]){
document.canvas.src = imagesArray[num];
usedImages[num] = true;
usedImagesCount++;
if (usedImagesCount === imagesArray.length){
usedImagesCount = 0;
usedImages = {};
}
} else {
displayImage();
} }
</script>
</head>
<body>
<table border=0 cellpadding="0" cellspacing="0">
<tr align="center">
<td><img src="images/blank.jpg" name="canvas" onClick="displayImage()"/></td>
</tr>
</table>
<div id="canvasDiv"></div>
<script type="text/javascript"> $(document).ready(function() {
prepareCanvas(); });
</script>
<a href="#" class="button" id="btn-download" download="my-file-name.png">Save</a>
<script language="javascript"> var button = document.getElementById('btn-download');
button.addEventListener('click', function (e) {
var dataURL = canvas.toDataURL('image/png');
button.href = dataURL; });
</script>
</body>
</html>
文件夹映射到自己的code
文件夹。当我对该文件夹中的项目进行更改并想要code
和git commit
时,我是否会从框中做到这一点(在我和ssh&#39; d之后)进入它)或从我的主机?