Modify Javascript with C#
Modify Javascript with C#
我有一个带有javascript的网页,上面有一个计时器。
<script type="text/javascript">
(function($){
var count = 10;
countdown = setInterval(function () {
if (count == 0) {
$("#countdown").remove();
}
count--
}, 1000);
$(document).on('submit', 'form.proform', function() {
if(count > 0)
return false;
});
})(jQuery);
</script>
现在我想创建一个C#应用程序来拥有一个客户端。但我不想等到计时器,直到我能看到洞的位置。有没有办法修改C#中的var count
以跳过计时器?感谢您的帮助!
试试这个。
Js:
var count = <%=CountValue%>;
在C#中:
public int CountValue{ get { return this._countValue; } set { _countValue = value; } }
设置页面加载中的计数值,如
this._countValue=0;
相关文章:
- Angular 2.0 with JavaScript or TypeScript?
- errors with Javascript try catch
- Laravel 4 render() PDF with Javascript
- Trouble overlaying one div with another with JavaScript &
- Replace a "href" element with javascript
- geolocation with javascript and ruby on rails
- Rails 4 jQuery conflicts with javascript
- PHP Error with Javascript
- listen to 'CTRL+N' with javascript
- Dissect an id with javascript?
- change jquery masonry css with javascript
- JQuery Mobile Styling With JavaScript
- Missing ) with JavaScript Code
- RadioButton with Javascript (MVC3)
- Perl with Javascript (Perlscript)
- Image Rollovers with Javascript
- javascript innerhtml with javascript variables
- AngularJS conflicts with JavaScript minifier
- sqlite with javascript with phonegap using build.phonegap.co
- onClientClick with JavaScript function and eval